<< Read Previous Page
We have already seen the technique to turn on diagonal LEDs only in previous page. Next is to increase the brightness of these LEDs. Circuit is the same done in previous page.
Beginners will plan to reduce the value of series resistance to increase the brightness because LEDs will get more current if series resistance is LOW. But it is not a good idea. This may lead to the permanent damage of LEDs due to over current. Then the best method is to make some modifications in the program. Upload this modified program to your arduino board.
If uploading is successful, brightness of the LEDs will increase. This program increases the ON time of LEDs ten times more than the OFF time. "for" loop executes the command to turn on LEDs ten times. But the command to turn off LEDs run only one time. Then by persistence of vision, on time will be ten times more than off time which will give a feeling to the eyes that brightness of LEDs are increased.
Read about the technique to reduce the number of arduino digital pins required to control LED matrix in next page.
Beginners will plan to reduce the value of series resistance to increase the brightness because LEDs will get more current if series resistance is LOW. But it is not a good idea. This may lead to the permanent damage of LEDs due to over current. Then the best method is to make some modifications in the program. Upload this modified program to your arduino board.
int pin_4 = 10; //Connect 4th pin of LED matrix to the 10th pin of arduino int pin_7 = 11; //Connect 7th pin of LED matrix to the 11th pin of arduino int pin_15 = 13; //Connect 15th pin of LED matrix to the 13th pin of arduino int pin_16 = 12; //Connect 16th pin of LED matrix to the 12th pin of arduino int i=0; // the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(pin_4, OUTPUT); pinMode(pin_7, OUTPUT); pinMode(pin_15, OUTPUT); pinMode(pin_16, OUTPUT); } // the loop routine runs over and over again forever: void loop() { for(i=0;i<10;i++) { // Turn on 1st LED and turn off all the other LEDs digitalWrite(pin_4, LOW); digitalWrite(pin_16, HIGH); } // Turn off 1st LED digitalWrite(pin_4, HIGH); digitalWrite(pin_16, LOW); for(i=0;i<10;i++) { // Turn on 10th LED and turn off all the other LEDs digitalWrite(pin_7, LOW); digitalWrite(pin_15, HIGH); } // Turn off 10th LED digitalWrite(pin_7, HIGH); digitalWrite(pin_15, LOW); }
If uploading is successful, brightness of the LEDs will increase. This program increases the ON time of LEDs ten times more than the OFF time. "for" loop executes the command to turn on LEDs ten times. But the command to turn off LEDs run only one time. Then by persistence of vision, on time will be ten times more than off time which will give a feeling to the eyes that brightness of LEDs are increased.
Read about the technique to reduce the number of arduino digital pins required to control LED matrix in next page.
Read Next Page >> |
ty guy
ReplyDelete