Hello, my first post here!
I got a Arduino Mega and this is my second problem with it and 0017.
the first problem was with the analogue pins solved here
<<in a link i can't post...>>
but now i have another issue:
When applying LOW to pin 42, both pin 42 and pin 43 are set to LOW
here's the code i ran to test this:
void setup(){
Serial.begin(9600);
}
void loop(){
Serial.print("Pin 42 ");
Serial.println(digitalRead(42));
Serial.print("Pin 43 ");
Serial.println(digitalRead(43));
delay(1000);
}
Have you enabled the internal pull-ups for those two pins, or are they 'floating' when the switch is not pressed?
A 'floating' pin will pick up noise and read as a random value unless you use an external pull-up or pull-down resistor or enable the internal pull-up.
i'm not exactly sure what that means... can you explain? thanks!
and this might help explain things....
i ran the code:
void setup(){
Serial.begin(9600);
}
void loop(){
for (int n =0; n < 53; n++){
Serial.println(digitalRead(n));
}
Serial.println("holy moly");
delay(5000);
}