Тёмный
Penguin Tutor
Penguin Tutor
Penguin Tutor
Подписаться
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

See the accompanying website www.penguintutor.com
MERG model railway dcc controller kits
21:20
Месяц назад
Introduction to DC motors
5:45
9 месяцев назад
Комментарии
@tubeDude48
@tubeDude48 8 дней назад
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
@PenguinTutor
@PenguinTutor 8 дней назад
@@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.
@tubeDude48
@tubeDude48 8 дней назад
@@PenguinTutor - I understand. I just hate putting money in Upton's coffer!
@larryplatzek9017
@larryplatzek9017 9 дней назад
your link to your page missing "g". Good intro to rp2350 boards.
@PenguinTutor
@PenguinTutor 8 дней назад
Thanks for pointing that out. Fixed it now.
@trippin0101
@trippin0101 11 дней назад
Really bad audio. Could not understand much.
@MeditationMusic-ne4nu
@MeditationMusic-ne4nu 14 дней назад
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
@elusive62
@elusive62 15 дней назад
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.
@PenguinTutor
@PenguinTutor 15 дней назад
@@elusive62 You could use either a cigarette lighter style usb charger, or a 12V to 5V buck converter.
@PenguinTutor
@PenguinTutor 15 дней назад
@@elusive62 Although possible without, I would recommend keeping the two power supplies completely isolated from each other. Eg using relays or opto isolators.
@PenguinTutor
@PenguinTutor 15 дней назад
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.
@elusive62
@elusive62 14 дней назад
@@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.
@elusive62
@elusive62 14 дней назад
@@PenguinTutor Thanks for response.
@The3DTechGuy
@The3DTechGuy 23 дня назад
penguin tutor can you plssss show how to activate the cursor on the lcd pls (with makecode)
@PenguinTutor
@PenguinTutor 22 дня назад
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
@The3DTechGuy 22 дня назад
Bruh 💀 but AI says its true on makecode
@The3DTechGuy
@The3DTechGuy 22 дня назад
IT Made a Code that really Said ShowCursor(true) Like fr😭
@PenguinTutor
@PenguinTutor 22 дня назад
@@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.
@satanaz
@satanaz 27 дней назад
thanks man! very easy to follow
@debsarkar4893
@debsarkar4893 27 дней назад
Just One Word. He is a Legend
@raquaez
@raquaez Месяц назад
can i know why u use 3x 100nF this orange i dont see it on 3:36 and i dont know for what it is used
@PenguinTutor
@PenguinTutor Месяц назад
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.
@ramizballou5197
@ramizballou5197 Месяц назад
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?
@PenguinTutor
@PenguinTutor Месяц назад
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.
@ishandutta2045
@ishandutta2045 Месяц назад
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 ?
@PenguinTutor
@PenguinTutor Месяц назад
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.
@armastat
@armastat Месяц назад
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?
@PenguinTutor
@PenguinTutor Месяц назад
Thanks - perhaps it was something like that. I didn't knowingly change anything when I re-exported later, but perhaps that could have been the reason.
@armastat
@armastat Месяц назад
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.
@PenguinTutor
@PenguinTutor Месяц назад
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.
@armastat
@armastat Месяц назад
Excellent ,excellent tutorial. been looking for one on CAD to laser for a while now. so few out there that is as helpful as yours.
@DhirendraKumar-wv2ok
@DhirendraKumar-wv2ok Месяц назад
Hello....Ctrl-alt-f3 cmd not working, pl suggest to me another way to fix it
@PenguinTutor
@PenguinTutor Месяц назад
In that case you may need to reboot and choose boot to recovery mode as shown at 18:19
@nathanberron5162
@nathanberron5162 Месяц назад
Still perfectly usefull on Ubuntu 22.04, thanks so much !
@waheex
@waheex 2 месяца назад
excellent video and helped explain how graphics work in Kicad
@Python_Professionals
@Python_Professionals 2 месяца назад
Your book explains basic Python and Pygame Zero in a very good way. Is it possible to get the code for the games in book from somewhere online?
@PenguinTutor
@PenguinTutor 2 месяца назад
The source code for all the games is available in GitHub github.com/Apress/beginning-game-programming-with-pygame-zero
@Python_Professionals
@Python_Professionals 2 месяца назад
@@PenguinTutor Thank you! :)
@bwelipitiya78
@bwelipitiya78 2 месяца назад
great video
@tubeDude48
@tubeDude48 2 месяца назад
At 13:00, I would have thought you would have labeled them Up and Down. Nice project though.
@PenguinTutor
@PenguinTutor 2 месяца назад
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.
@ThePulsar14
@ThePulsar14 2 месяца назад
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
@PenguinTutor
@PenguinTutor 3 месяца назад
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+
@PenguinTutor
@PenguinTutor 3 месяца назад
For the full length video explaining my earlier problems see: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-MVHeyq3WbHM.htmlsi=-RTQnd0wzPz6_fhn
@PenguinTutor
@PenguinTutor 3 месяца назад
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.💻
@tommytjc
@tommytjc 3 месяца назад
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.
@doganbenli9681
@doganbenli9681 3 месяца назад
You save my day! Thanks and God bless you.
@DaleAllyn
@DaleAllyn 3 месяца назад
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.
@horvathbenedek3596
@horvathbenedek3596 3 месяца назад
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.
@andrewd4906
@andrewd4906 3 месяца назад
I got a 500gb kit from pimoroni and have had no issues. It was a huge increase in speed.
@PenguinTutor
@PenguinTutor 3 месяца назад
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.
@tubeDude48
@tubeDude48 3 месяца назад
See *Computers Explained.* Chris had no problems interfacing to NVMe.
@bob_mosavo
@bob_mosavo 3 месяца назад
Thanks 👍
@fabiomalmsteen3576
@fabiomalmsteen3576 3 месяца назад
HI thanks for the excellent video, I wanted to ask you how it is possible to add export in raw format to video capture? Thank you very much
@PenguinTutor
@PenguinTutor 3 месяца назад
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
@bob_mosavo
@bob_mosavo 3 месяца назад
Thanks 👍
@stevegj6wri216
@stevegj6wri216 3 месяца назад
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!
@SketchyMarieArt
@SketchyMarieArt 3 месяца назад
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!
@mauriciorojas2204
@mauriciorojas2204 3 месяца назад
i try to ctrl alt and all the F´s but none of them worked :( im stuck here, you know if theres something more i can do?
@PenguinTutor
@PenguinTutor 3 месяца назад
In that case you will need to reboot, select recovery mode with root shell and then try the recovery from there.
@jesanmorales100
@jesanmorales100 4 месяца назад
Hi, does it matter if I use C++ instead of Python and use the Arduino IDE? or do I have to code in Python
@PenguinTutor
@PenguinTutor 4 месяца назад
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.
@tytrvd
@tytrvd 4 месяца назад
Amazing work !
@Davoda2
@Davoda2 4 месяца назад
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
@PenguinTutor
@PenguinTutor 4 месяца назад
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.
@mariogarcia2199
@mariogarcia2199 4 месяца назад
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'
@mariogarcia2199
@mariogarcia2199 4 месяца назад
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?
@PenguinTutor
@PenguinTutor 4 месяца назад
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?
@kashifrehman5982
@kashifrehman5982 4 месяца назад
At 04:25, which commands you used to reach that screen. Please help
@PenguinTutor
@PenguinTutor 4 месяца назад
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.
@jakubstanicek6726
@jakubstanicek6726 4 месяца назад
Since baterries were mentioned, do somebody know some good solution with Pico for a baterry powered device? Im looking for some. Thanks
@matthewkirk4345
@matthewkirk4345 4 месяца назад
Found this channel from the rpi meeting in london, rlly cool video! :)
@KaradevNetLtd
@KaradevNetLtd 4 месяца назад
also C/C++ is miles away better then python /shmython beleive me i know from '90 era of computers and electronics and programming ;)
@KaradevNetLtd
@KaradevNetLtd 4 месяца назад
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
@cubeleaf7895
@cubeleaf7895 4 месяца назад
The thonny always flash over your ppt at first minute. That feels like a flash bomb and hurt my eyes😰.
@PenguinTutor
@PenguinTutor 4 месяца назад
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.
@cubeleaf7895
@cubeleaf7895 4 месяца назад
@@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.
@PenguinTutor
@PenguinTutor 4 месяца назад
@@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.
@smorris12
@smorris12 4 месяца назад
Oooh, what a fascinating chip. One use i can think of for this is to have it at a distance from the processor just using 4 core cable
@PenguinTutor
@PenguinTutor 4 месяца назад
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.
@MrVitaliyAT
@MrVitaliyAT 5 месяцев назад
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'
@domotcl
@domotcl 5 месяцев назад
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?