I'm Stewart Watkiss - known by my website PenguinTutor. I'm a maker and author. I create videos for makers - featuring Raspberry Pi, Arduino, Electronics and 3D printing. How to videos. How to design new projects, how to make them work and completing the project.
Includes information on Raspberry Pi and Linux and how to get the most of your Raspberry Pi.
I'm based in the UK but my projects can be completed anywhere and my books on Electronics, the Raspberry Pi and games programming are available worldwide.
Please subscribe to my channel to find out about new projects I'm working on and how you can complete them yourself. -- Thanks Stewart
I'd hold off for the Pi Pico 2 W. People tend to buy without thinking that they will produce another board, and end up just spending MORE money! jezzzz
@@tubeDude48 There will be a 2W later this year, but I have some projects that don't need WiFi. At less than £5 it's not much to buy a standard Pico 2.
Your content is very professional and very nice. But there are some problems with your RU-vid channel, if you want we can discuss the problems. Solving the issues will help the channel grow and get more subscribers and views
Great vid mate, If possible, could you give some advice, I am looking to use the pico w in my car, What id like to do is power it from a 12V battery, That is the issue i have, i dont know how. The reason i want to use the pico W in my car is mainly as a way to.., press a button, power on, side lights of the car turn on for 30 seconds, power off. I have done the coding for the powr on, delay, power off, but i dont know how to power a 5V pico from a 12V battery, I wont be using the car battery, infact I will be using a 2nd battery I will be placing in the boot, i havent chosen yet if it will be a leisure battery or a car battery. I have other plans to make that battery multi purpose, such as connecting a convertor to power my airsoft batteries and a mini cooler. My end goal for the pico W is to bring a feature to my car that other cars have, such as pressing the key fob to unlock the car and the main lights turn on, i think its like a courtesy lights, sadly my interior light doesnt turn on with the unlock, it only turns on when opening the door, so other ways around my issue is impossible, but that is my intention, courtesy lights. other future ideas are of course, RGB within the car which, once i have a solution for the powering, ill be using my Pico WH for it. I have put a post on reddit but the moderators keep removing my post, i have tried posting on respberrypi and raspberry pi projects. not sure why but mods on both pages remove my posts about this.
@@elusive62 Although possible without, I would recommend keeping the two power supplies completely isolated from each other. Eg using relays or opto isolators.
I mean the two 12v supplies, the car and your electronics supply. You will also need to make sure all your signals to the Pico are only 3.3V and you increase the signal to be enough to drive whatever outputs you are using (eg relays). Or it may be possible to drive opto-isolators / optocouplers directly depending upon voltage and current requirements.
@@PenguinTutor the only part the wiring would come together would be at the sidelights, I did consider using the VCC as a signal for the pico to begin the timed "sidelights on" for 30 seconds, but i think it would be much more simpler to put a button i would press to begin the timer.
Unfortunately I don't think that is possible, or at least not with the standard extensions. To turn the cursor on and off involves sending a special code signal to the LCD display. Unfortunately the library used in MakeCode does not have an option for sending that code. You could most likely turn the cursor on and off by using Circuit Python on the microbit, but not makecode.
@@The3DTechGuy Which is one of the problems with AI. It doesn't actually understand but just puts together what statistically looks right. Sometimes AI can come up with code that works, but often it doesn't. It's possible someone has created a makecode extension that does include that, but I suspect it's just AI getting it wrong.
Capacitor C1 is connected between the UART connector and the Reset pin of the ATmega328p. This is to reduce the risk of any transient noise on that pin from causing a reset. C2 is connected directly across the supply near to the IC. This is to reduce noise on the power supply going to the ATmega328. Typically these should be as close as possible to the power pin of the microcontroller (pin 7). These are standard for any circuit which uses ICs with one typically next to the supply pin of every IC. You can create a circuit without one, but it is recommended one is included - hence the reason it's sometimes left-out out during a prototyping stage, but then added when creating a permanent circuit. C3 is similar to C2, but used for the Analog to Digital circuitry within the ATmega. It's connected to AVCC supply connection (pin 20). The supply does need to be connected to the AVCC pin even if not using the A/D converter. If the A/D converter is used then the datasheet recommends using a low-pass filter is used for that supply, so I compromised with an additional capacitor. Looking at the circuit diagram for the UNO then they don't appear to use use either a capacitor or a low-pass filter near to the AVCC pin, but they do include an additional 100nF capacitor as part of the power supply circuitry, it's just not physically close to that pin. So again optional, I'd suggest C2 is more important.
Nice presentation and clear coverage. I tried to use 2 RPI (instead of RPI and Uno) connected to communicated via SPI using python but does not seem to work. Any suggestion or a script that you can point me to?
Thanks for the comments. That's not something I've tried. Most code for the Raspberry Pi will assume that it's a controller (master), and act accordingly. I don't have any suggestions for examples of using RPi to RPi at the moment as I've normally used either UART or network for that. I am wanting to look further into various BUS technologies / protocols in future so I will try and look into at least some form of RPi peer-to-peer in future.
Great library. I want to do everything people do with blender via python. I don't see any update to the library for last 2 years , did you jump on to something else ?
I'm still using it occasionally for my own videos and it does what I need. But I'm not really sure of the best way to take it forward. It feels quite complicated to use even for myself.
Its only a guess but in the export options (or maybe other places) check the segments options for curves. normally this is 50 segments per circumference. if its too low then this will borke your curves when manipulated/converted by the program?
One tip I would pass on is dont use the minus/hyphen key in names. if u should need to use it in a formula for parametric work it tends to be treated as an arithmetic minus operator, ,lol, learned that the hard way. I use Underscore OR just one whole word with capitals at the start of each word.
Good point. I was not planning to do anything code wise or use anything in the FreeCAD spreadsheet etc, but you are right that if I did then using underscores usually makes life easier. I'm not sure in FreeCAD, but you can normally get around the use of hyphens by using quote or escape characters, but it's easier if you don't need to. It's the same reason I often avoid spaces in filenames although there are usually ways around it, it's usually easier to avoid in first place.
I was about to. In fact if you look at the source code on github there is still an up.png and down.png in the design folder. One reason I changed my mind is because the switch on the left of the layout goes left and right rather than up and down. I did think about having an up and down line, but other than one double track section for a station there is no where that would make sense, and as it is a circular track it doesn't have a destination to have as the primary direction. As the track is circular I did think about having inner and outer track, but again one of the sidings is innner and the other is outer. I'm also planning to use it on another layout (not built yet) where the tracks will not be in a loop so it wouldn't make sense there. It was at Model Key World when my son was using a DCC controller where the points were all controlled with buttons 1 and 2 on the DCC controller that I decided to go with 1 and 2. In fact none of the options are ideal. One thing though is that I've made the source code available, and changing it would be as simple as either editing the html file and changing it to use the different image files, or saving the up and down button files over the top of the button1.png and button2.png files. You could even change the html so that some have up and down, and some have left and right, but I wanted to keep it generic so you wouldn't need to customise if using it on a different layout. A major factor is that interface is not really intended to be used. The web API will be used by the GUI and I just thought I may as well create a basic web page so that you could control it with say a mobile phone if you wanted to.
On a 7" Tablet all the coding done in small font, comfortable for a big monitor, is completely unreadable or very hard to follow. So, please, for future videos, keep into consideration for this especially if you can have free space available on your screen. Thks
Here is how easy it was to setup with my new replacement Raspberry Pi 5 ru-vid.comSl1Cod2KKOM - shown here with the Pimoroni NVMe Raspberry Pi base, but also just as easy with the official Raspberry Pi M.2 HAT+
Since making this video I ordered a new Raspberry Pi 5. Connected it to the Pimoroni NVMe base (the RPi HAT+ is in use with my other RPi5). It still needed the EEPROM to be updated but then once rebooted it detected the drive straight away. Enabled boot from NVMe using rpi-config, removed the SD card and it now boots from the SSD. So it does look like I just had one RPi5 which doesn't work with the NVMe drives.💻
Built my first PI this last winter - PI-5. Installed Ubuntu with 2280 hat. No problem. Tried to install Pi-Star, and couldn't get the NVMe drive to work, nor the UI. Ended up with a full Raspberry PI OS and a 2240 hat as everything fit together nicer and worked. One issue remains: if I unplug then plug in the PS, everything works. The button on/off switch on the Pi-5, or a sudo reboot always fails. I have to unplug then plug back in the PS. Using recommended PS. Made all the config changes. At present I'm at a loss on boot issue, though everything is up and running, so I'm operational.
In case it's of help to others who may come here to troubleshoot, I'll mention that heeding the recommendations of using certain recommended brands and models of NVMe SSDs is important (at least for now). I'm using an Argon ONE v3 case with MVMe base. I flashed a Western Digital SN850X with Ubuntu Desktop 23.10 and wasted a lot of time trying to get it to work. Boot wouldn't complete (link down). I then tried Pi OS Debian distro and that, too, didn't complete boot. I tried a second WD SN850X and still no love. I then ordered a Kingston KC3000 NVMe SSD (all of my SSDs are 2280) having seen it on compatibility lists, and it booted without hesitation (Ubuntu 23.10). I'll re-flash it with Ubuntu Server LTS next, but the Ubuntu Desktop is very snappy on the Pi 5 w/SSD. The Pi OS Debian Bookworm is snappy as well.
Wow, Raspberry Pi is soo great... r Remind me again, what's the current draw of a Raspberry Pi on startup? (It's 5 Amps). And is Raspberry Pi deterministic and safety critical? (It isn't). Can you do ADC operations with a Raspberry Pi? (No) Can you easily use bare metal programming on a Raspberry Pi? Debatable, but most people who use it probably have no idea how. There is a very good reason microcontrollers exist in the world of microprocessors, just like the invention of nail guns and rocket and jackhammers didn't make hammers obsolete. MCUs are simpler to program on a hardware level, the architecture is easier to understand, which is essential for real time operations; they can typically control more peripherals, do so with a lower response time, and as I said, in a deterministic manner. Traditional operating systems are fast enough for the human eye, but if you're running several cascade control loops with various sensors, and the time constant of each inner loop needs to be 10 times faster than the outer one, you VERY quickly go from micoseconds to miliseconds, to ten miliseconds, to 100 miliseconds... and that's 10 fps, for people out there. Sure, you're not going to build a spacecraft with Arduino Uno, which is why actual embedded MCUs are much more powerful, but for simple prototyping Arduino probably the least painful way to go.
I did as well and the Pimoroni NVMe worked well first time. My problems were due to a silly mistake by me - ordering the wrong kind of SSD for a second upgrade and hardware problem with my second Raspberry Pi. I'm ordering a new Raspberry Pi to replace the one that didn't work.
Most proprietary "raw" formats are designed for a specific camera. A "raw" format from picamera would be to just capture the image as an array of pixels. This can be done using array = picam2.capture_array("main") That will give a 3 dimensional Numpy Array which you can then manipulate and convert / save as required. An alternative is to capture into the PIL format which can be manipulated and / or exported - eg. export as an uncompressed TIFF image = picam2.capture_image("main") (then process as required) Or if you want raw video capture then use: config = picam2.create_video_configuration(raw={}, encode="raw") picam2.configure(config) encoder = Encoder() picam2.start_recording(encoder, "test.raw") This is all covered on the Picamera2 documentation at: datasheets.raspberrypi.com/camera/picamera2-manual.pdf
Excellent tutorial. Yours is the best refresher video I have seen to stir my grey matter reminding of 40+ years ago at college doing City & Guilds Electronics!
This tutorial was perfect for what I am working on! Thank you for explaining how to select a transistor and calculating the resistor for the base! Much appreciated!
You can use C++. Raspberry Pi have provided a tool chain based around visual studio, but I believe others have created the steps needed for the Arduino IDE. Or there is an Arduino RP2040, but that's quite expensive compared with the Pico.
My problem is that it's saying the I need to install a few more things but networking simply doesn't work (or I don't know how to fix it) So both dpkg and apt --fix-broken doesn't work. Can anyone help? Thank you
Do you have a physical ethernet port, connecting by cable often works even if your wireless driver doesn't. The alternative is that you can download files on a different computer, transfer by USB stick and then install using dpkg, but that can get very tedious if there are lots of dependencies that also need to be downloaded.
I keep running into this error message : File "C:\Users\mario\AppData\Local\Programs\Thonny\lib\tkinter\__init__.py", line 1921, in __call__ return self.func(*args) File "C:\Users\mario\AppData\Local\Programs\Thonny\lib\site-packages\thonny\workbench.py", line 2027, in toolbar_handler handler(*args) File "C:\Users\mario\AppData\Local\Programs\Thonny\lib\site-packages\thonny unning.py", line 527, in cmd_run_current_script self.execute_current("Run") File "C:\Users\mario\AppData\Local\Programs\Thonny\lib\site-packages\thonny unning.py", line 459, in execute_current filename = editor.save_file() File "C:\Users\mario\AppData\Local\Programs\Thonny\lib\site-packages\thonny\editors.py", line 314, in save_file result = self.write_local_file(save_filename, content_bytes, save_copy) File "C:\Users\mario\AppData\Local\Programs\Thonny\lib\site-packages\thonny\editors.py", line 334, in write_local_file f = open(save_filename, mode="wb") FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\mario\\AppData\\Local\\Temp\\0f9c0e8b-ddc3-45d6-be61-e22d09b0c37e_pico-animation-code.zip.37e\\pico-animation-code\\image_convert.py'
during the animation I made it 12 frames and labeled it similarly but continued to receive internal error messages, I could be uploading the images wrong into the pico though, should I make it a file and upload it? or individually?
The error appears to be due to a problem writing to a file. It appears to be trying to write into a zip file. Have you extracted the files from the zip first?
If you are still in Ubuntu then you can try CTRL-ALT-F3 to get a terminal. If not then reboot, which should put you at the Grub screen. If you've set boot to automatically boot to Ubuntu then you can hold down shift when booting to bring up the grub menu. From the Grub Menu choose Ubuntu wth recover, then choose a root prompt. I hope that helps.
MCP23S17 is SPI interface / protocol and is better then i2c, and is 16 bits and i use it alot and check my channel to learn some real for automation. :) all is FROM BULGARIA ;) watch and learn how to do it properly
Sorry if it's a bit bright. I tend to use colours that are accessible, including light coloured backgrounds and (when possible) increased fonts and cursor size. This is in response to some of my earlier subscribers that said how difficult it was to read the screen sometimes. Although I've also noticed that in Thonny even the dark themes have a very bright background for the main part of the editor.
@@PenguinTutor No what I mean is that in the first minute of your video, thonny's window will always appear in the top half of your screen and then disappear. This causes the top half of the screen to be flickering constantly.
@@cubeleaf7895 Oh yes I see what you mean. Sorry about that. I didn't see that in the video editor, but then it does flash away pretty quickly. I created the presentation in Google Slides, it's one of only a few times I've used that for creating videos. Perhaps I'll switch back to LibreOffice Impress in future. Thanks for pointing it out.
Yes indeed. I2C can run for a few meters so as long as it's not too far. I'm planning to use the MCP23008 on a different PCB although I'm my current project they will be in the same enclosure.
usage: certbot [SUBCOMMAND] [options] [-d DOMAIN] [-d DOMAIN] ... Certbot can obtain and install HTTPS/TLS/SSL certificates. By default, it will attempt to use a webserver both for obtaining and installing the certificate. certbot: error: argument -n/--non-interactive/--noninteractive: ignored explicit argument 'ginx'
Thanks for the very useful video. One question, though: You casually mention to use a Schottky diode. This is for the power supply, so a DC voltage. Then neither the higher switching speed nor the lower forward voltage drop of a Schottky diode seems to be important when using a 5V or even 3.3V external power supply. Wouldn't a regular 1N4148 or 1N4001 also be usable in such a situation?