Raspberry Pi LESSON 4 HOMEWORK SOLUTION: Understanding and Using GPIO Pins

preview_player
Показать описание
The GPIO Pinout in this video has an error. You can download the corrected pinout here:

Announcing the Most Awesome Raspberry Pi Lessons of All Times! This time we RUMBLE!

In this class series, we will be using the most excellent Sunfounder Ultimate Raspberry Pi kit, available here: (Affiliate Link)

In this lesson I will take you through my solution to the homework assignment in lesson #4. I show how to write a python program that will prompt the user for how many times to blink an LED and then will control the GPIO pins to blink the LED that many times.

You guys get your hardware ordered so you can follow along at home!

You will also need a Raspberry Pi. I suggest the Raspberry Pi 4. If you do not already have one, this is the most suitable gear I could find:

The Raspberry Pi's are sort of pricy right now, so you can look on ebay or elsewhere to see if there are any deals. You will need a SD card. If you do not already have one, this is a good one:

I like using a wireless keyboard and mouse to have fewer wires. You can certainly use your USB keyboard and mouse, but if you want a nice wireless one, this one works on the pi.

You guys can help me out over at Patreon, and that will help me keep my gear updated, and help me keep this quality content coming:

#GPIO
#RESISTTHEMETAVERSE
#RASPBERRYPI
Рекомендации по теме
Комментарии
Автор

I cannot believe that my light actually blinked! Thanks, you are a great teacher. I watch in 2x speed and it is like you have had 10 cups of iced black coffee.

chrisjowaisas
Автор

Sir, I want to say Thank you for your efforts to educate us, we really appreciate it. I finished your arduino lessons, started python coding, going well so far (not folding up like a cheap walmart lawnchair) and I just needed to say thank you for all of your classes. You have a faithful audience all over the world. Cheers from Bosnia & Herzegovina!

ohyeahthatsawesome
Автор

Another faithful student here, thank you! Starting from zero electronics experience, I've followed your entire arduino series and am now dipping into the raspberry pi. It's been a joy and I really appreciate the incredible resource and learning experience you've created. Cheers from Australia

lalabali
Автор

I am legend. Because I didn't manage to buy RPi, I made it for control also with printed output in terminal. And thanks to your great Python lessons I was able to do it all by myself in few minutes and most importantly without using hints and my previous notes. Great feeling.Thank you.

jansimurda
Автор

Thanks for this Paul! I am just learning Python and when I did the homework for this I had never seen any reference to the range() function used in for loops. OUTSTANDING!

Lehibob
Автор

I am Legend. 12am! Ill watch this tomorrow to see how you did it compared to me. I did have one issue. I kept hitting ctrl z out of habbit in other programs. Then I had to type fg + enter to get back my program. Weird but I learned how to fix it. Ctrl z is like a nervous twitch I have. lol. UNDO! UNDO!. P.S. You got me drinking coffee without the sugar or creamer. coffee = ice + jetfuel. You do so much for the world. God bless.

rockymountainfacet
Автор

So i finally got my Raspberry to be accesible via Putty and after lesson 4 i've been puzzling for about 1.5 hours why it didn't work wth the LED. Found out that doublechecking reistor values is a virtue! i used a 330K in stead of 330....what a dufus....Thanks for the lessons sofar, , i will be following them all now! Greetings from the Netherlands

fammertens
Автор

Enjoyable! Thanks for including your mistakes. We all learn that way.

tpobrienjr
Автор

Thanks for the solution Paul. Have a good evening.

leeg.
Автор

I liked the video yesterday I listened at work. So I didnt get to do the homework. I think I will try some of these though I am a rookie with arduino and am interested in python.

JACKOFALLTODD
Автор

I am Legend minus forgetting to use GPIO.cleanup().
The first few lessons in this series are fantastic. I bought my Raspberry pi 3 a few years back, but I was having trouble learning to navigate the linux environment while simultaneously trying to learn Python. Though I have already taken many of your python lessons (making it easier for me to work with nano), I think your lessons do a great job at clarifying how to function in both environments.

jonathanlanders
Автор

Thanks Paul. I love watching and learning from your tutorials. One question, I am confused how to determine what voltage is produced from pin 11. How does the GPIO decide. Is it 3.3v since it is from the same column. The wiring diagram said 5vdc so I don’t understand how the GPIO knows what voltage to use. Thank you so much…Cheers from AZ!

harolddunn
Автор

I’m a year late, but I’m 69, so better late than never… Enjoying the classes very much! Thanks for doing these… (I’m learning Arduino as well😊), Cheers

Eagle
Автор

I am legend. Thank you again for your excellent tuition.

JoRogan-lv
Автор

Really good tutorial, thanks for your efforts :)

alessandrorhomberg
Автор

Did it on the Raspberry pi 5. Setup is a little different as you need to use gpiod library instead.

TaiTai-pytp
Автор

I am legend.

This was a fun lesson. This is exactly how I wanted to learn. Looking forward to continuing!

James-tstc
Автор

Paul, in the future can you take time out to comment on the flora & fauna in the background?

hoboken
Автор

I did it a little differently. The program stops if the user writes 0 for the number of blinks.

josenoelcaraballo
Автор

I would appreciate if someone could tell me how to get Scratch to show all the Raspberry pi in the Extensions (of Scratch?) I read it came with raspberry pi software, I installed the software and I do not have scratch 3. I appreciate all of your time! Thank you PAUL for a great video!

michaelcarroll