So the problem is that I don't know how much resistors to add, or even if I should add some. I am using LED's and I always hear "Don't power LED's without resistance". I have been powering about 20 at a time in a simulation of arduino (supplies 4 to 12 volts) and it seems fine but a little dim. Do I need to add resistance? Allow more voltage? How do I add more volts?
My code:
Cathodes are connected together and to ground
Anodes are connected to various pins
(Sorry for the minor incoherencies)
Moderators note: used code tags
My code:
C:
void setup()
{
pinMode(8, OUTPUT);
pinMode(13, OUTPUT);
pinMode(12, OUTPUT);
pinMode(11, OUTPUT);
pinMode(10, OUTPUT);
}
void loop()
{
digitalWrite(8, LOW);
digitalWrite(13, HIGH);
delay(400); // Wait for 400 millisecond(s)
digitalWrite(13, LOW);
digitalWrite(12, HIGH);
delay(400); // Wait for 400 millisecond(s)
digitalWrite(12, LOW);
digitalWrite(11, HIGH);
delay(400); // Wait for 400 millisecond(s)
digitalWrite(11, LOW);
digitalWrite(10, HIGH);
delay(400); // Wait for 400 millisecond(s)
digitalWrite(10, LOW);
digitalWrite(8, HIGH);
delay(400); // Wait for 400 millisecond(s)
}
Cathodes are connected together and to ground
Anodes are connected to various pins
(Sorry for the minor incoherencies)
Moderators note: used code tags
Attachments
-
126.2 KB Views: 5
Last edited by a moderator: