Lights? Cool ha?
Save your changes by pressing:
Ctrl + X, Y then press Enter
Lights are an easy way to express indications for any process, they are like little alerts or notifications.
Today, let's learn how to set up a LED with a Raspberry Pi.
You should already know how to log in via SSH and use Filezilla. If you don't know how to, then follow the links below:
SSH - click here
Filezilla - click here
You should already know how to log in via SSH and use Filezilla. If you don't know how to, then follow the links below:
SSH - click here
Filezilla - click here
To see the practical demonstration, watch the video below.
Things you'll need:
- Raspberry Pi
- Power source for Pi
- A LED
- Resistor (330 Ω)
- Breadboard
- Male to female jumper cables
Note: Make sure you connect the positive end of the LED to GPIO 21 and the negative end to Ground PIN
Now turn on your Raspberry Pi and copy the LED.py file to /home/pi/ using Filezilla
Download LED.py here
Now open terminal and type the following:
sudo python LED.py
Your LED should now blink 4 times with a delay of 2 seconds.
To exit the program press:
Ctrl+C
You can also edit the code if you feel like experimenting. Type:
sudo nano LED.py
Save your changes by pressing:
Ctrl + X, Y then press Enter
Have fun with your light set up and let me know about it in the comments!
Comments
Post a Comment