Twisting the Possibilities with Arduino
Arduino From Ordinary to Extraordinary Hello guys! Welcome to the world of arduino. We are at new project. LED either ON the or OFF digital prints but we have to find a method with which we can dim the LED. This Method is to use analogue with the use of this we can get output from 0 to 5 volt in between all values such as 1, 2 and 3 so if we increase the voltage the brightness of LED bill increase. 0------------5V 0 ------------255 At Arduino board highest voltage is 5 volt but in coding zero corresponds to 0 and 5 volt corresponds 255. Circuit Coding Use digital pins with symbol of analogue ~ So now write a program int redpin=9; int bright=255; Here 255 corresponds to 5 volt. void setup() { pinMode(redpin, OUTPUT); } void loop () { analogWrite(redpin, bright); We declared bright variable is equal to 255 which means 5 volt that mean the LED will be turn ON. } Change the value of bright in above declared variable if we write zero voltage LED will be off. If we writ...