AI on the Jetson Nano LESSON 58: Controlling an LED With GPIO Pins and Button Switch

preview_player
Показать описание
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:

In this video lesson we learn how to create an input GPIO pin, and output GPIO pins. We create a toggle switch using a pushbutton to control a LED.

We are using components for the Elegoo Super Starter Kit. I recommend you get one of these if you do not already have one, as it has lots of great components that are useful for a variety of projects. You can get your kit HERE:

Also, you can find great resources at my WEB site, which you can find here:

OK, now this is the gear I am using for my Jetson Nano project shown in today's video. Lots of folks have expressed interest in this project, so I will do a big tutorial series on it. It is good if we use identical hardware for the project, so links below will take you to the gear I am using. Make sure to get the V2 picam, which is what I linked to. The earlier picams will not work. Also, you can use USB keyboard and mouse if you do not want to spend for the wireless ones below.

Jetson Nano

You need a GOOD power supply:

You need a GOOD SD card:

I love this cool Acrylic case with fan:

Wireless Keyboard and Mouse that works with Jetson Nano:

I like to run with minimum wires, so I am running this wifi card, which works very well. If your budget is tight just use an Ethernet cable, as all my lessons will work with just an ethernet cable.

Finally, you can use either a Logitech C920 WEB cam or the Pi Cam. I am using both, but you need at least one camera working with the nano:

#JetsonNano
#AI
#Tutorial
Рекомендации по теме
Комментарии
Автор

Yes, I'm enjoying these lessons. I really love the A.I. part but I do love the circuitry that interfaces to the outside world. Now I have more power to control my world. Have a great weekend.

opalprestonshirley
Автор

Thanks Mr.paul🙏, I did it in the concept of 1 and -1
-1: LED-Off
1: LED-On
So just multiply by -1 to switch the state, learned it the older arduino tutorial .

ahmedmk
Автор

Fun lesson seeing how my method was very close to yours. Took a few tries to get enough delay to stop the switch bounce. Thanks Paul

paulmeistrell
Автор

Hi Paul. I am here to support you! God Bless You!

IMHVideos
Автор

Great tutorial series and getting near the end :-(
The homework task was fairly easy to setup. I did it in much the same was as you've done
I'm glad we got back to bread boarding after all the deep learning.

markpritchett
Автор

Note this code is an infinite loop with no sleep in it, so it runs around the loop as fast as it can and pegs an entire CPU core at 100%. That's OK if you're not doing anything else on your system, but it's a good idea to put in a short sleep, like 1/10th of a second which the user won't notice but reduces the use of the CPU core from 100% to 1% as I just verified with the process monitoring tool, "top". Reducing the CPU usage will also reduce the power consumption and heat. Power went from about 3060 mW (3.1W) down to 2360 mW (2.4W) as reported in jtop on my system where I'm also running the Chrome browser and a PWM fan. That's about a 23% power reduction. "jtop" is another cool tool that shows you overall CPU and GPU usage, CPU, GPU, total power consumption, temps, fans, Jetpack, CUDA, OpenCV, TensorRT versions, etc. though it is a separate install.

mikethompson
Автор

I do enjoy these lessons and I'm having great fun going through them. I did manage to get the homework assignment to work using "NOT" . However, it was a bit "touchy" when I pressed the button. My code did not have the "buttonState", was just looking for "0" from the button itself. Please keep up the good work!!

boxertwo
Автор

Hi Paul,
My solution was different, did not used button Old and New, instead I've put a 0.2s delay on reading the button state so it does not turn on and off when you press the button. The issue is when you hold the button for more then 0.2s it will eventually turn on and off continuously. I'm a bit ashamed now for not putting more effort in my homework...

Mircea
Автор

Hi Paul..
Do we not have to account for button bounce? We added a delay back in Arduino lessons to account for button bounce

billfield
Автор

Awww man, I want to get hooked up onto this series but I'm at arduino

I'll see y'all after I finish arduino and perhaps robotics ^_^

अण्वायुवरीवर्त
Автор

I did it, and it worked, but I did it with a more complicated solution to get rid of the button bounce problem, so I use a counter and a Time. sleep(1) command
Nice solution with the Boolean NOT command :)

ricardobjorkeheim
Автор

Nearly had it. Didn't think of using the not. Had it toggle a lightstate any time the button was pressed. Mostly worked, but didn't account for pressing and holding the button down, which would have the light toggle on/off for however long the button was held and remain in the last state when the button was released

geeksatlarge
Автор

No Comnents? Thanks for teaching us and <3 man

atishay
Автор

For those who have watched the Arduino series this would be easy to solve.

sanfinity_
Автор

Looking to purchase a JETSON ... Can I use NVIDIA JETSON XAVIER for tease lessons / videos. Thanks for the great work on these

bobfrench
Автор

How about remotely controlling the LED, how can we do that via some coding commands like turn on white led, turn off white led... turn on green led... turn off green led?

mihailstoyanov
Автор

FYI: Boolean was an ancient mathmatician, who worked really hard. They named the type bool after him.

Bob-zgzf
Автор

Paul,
Instead of using a transistor based circuit to drive the LED, would it be possible/practical to use a 7400 series TTL based buffer chip? It might be just a bit more expensive, but not that much. Anyway, your thoughts would be appreciated. Thanks,

jeraldgooch
Автор

i know production of your videos can be difficult when you are a one man show. However the videos are still well managed, wish i could help in some way

lilgator
Автор

Hey Paul, I finished the Arduino series (thanks it was fantastic!) and am looking to move onto Jetson. If I intend to do both your Xavier and Nano playlists, can I just buy the Xavier first up and use the Xavier during your nano tutorials or do I need to buy a Nano first? (I can afford the Xavier but would prefer not to buy both...). Thanks so much for all your work!

elrilesy