I wrote some simple code to make pins 2 to 54 outputs and turn them on and off in order. Then I wired 52 LEDs ... all of them seem to be doing what I want except pin 50 and 39 turn on and off many times when they ought to be off. Can you help me understand this? I am guessing it has to do with the hardware on the 2560 ...
Here is my code:
void setup() {
for(int i =2; i<54; i =i+1){
pinMode(i,OUTPUT);
}
}
void loop() {
for(int i =2; i<54; i =i+1){
digitalWrite(i,1);delay(50);
digitalWrite(i,0);delay(50);
}
}