a) Raspbian OS: This is the recommended os for raspberry pi. You can also installed other OS from third party. Raspbian OS is debian based OS. We can install it from noobs installer. you can Download it from here
b) Python idle: This is the software we get in raspbian os. For this project we have used python script.
c) Putty: We are using putty for remote access of Raspberry Pi.you can Download it from here
d) Win32DiskImager: This software is used to burn Raspbian Os on SD Card. you can Download it from here
e) SDFormatter: This software is used to format memory card. you can Download it from here
Project Description:In this project basically we will go through about 4 things. And those are GPIO Inputs, pull up resistor, GPIO outputs and PWM. So whenever we will press one button the intensity of leds will increase, and if we will press another button the intensity of leds will decrease. Two buttons will work as GPIO Inputs and two leds will work as GPIO outputs. Here we are using PWM concepts. As we need to give pulses to leds pins and we will start PWM at 0 percent duty cycle and will go to 100 percent duty cycle.
Circuit Diagram:Here we are using the GPIO pin number scheme so as you can see in the circuit two buttons are connected to GPIO pins of 23 and 18 respectively, and two leds are connected to GPIO pins of 25 and 24 respectively.
Source Code and How to Run the Code in Your Raspberry Pi:You can get the source code of this project in Code Section. Now how to run this code.
For that first login to your raspberry pi by SSH or if you are using dedicated monitor for that so just power up your raspberry pi, now create one directory in your desktop named dimable by giving the command
sudo mkdir dimable
now go to that directory, give command
cd dimable
now make one file by giving the command
sudo nano dimable.py
Now in this file just paste the downloaded code and now the final step is just run that code by giving the command
sudo python dimable.py
Conclusion:So after succesfully running the code you can enjoy this Dimable leds project.
If you have any doubt regarding this project feel free to comment us below or you can mail us on info@deligence.com And if you want to learn more about these type of projects then feel free to visit our youtube channel
Thanks & Regards,
Deligence Technologies
Comments