Identify transposed A4 & A5 on ebay boards
Posted: 17 Mar 2018, 16:17
A deliberately simple, throwaway sketch to prove A4 and A5 transposition or not.
Flashes A4 four times, and A5 five times, with the D13 led slowly flashing as confirmation that something is happening.
Flashes A4 four times, and A5 five times, with the D13 led slowly flashing as confirmation that something is happening.
Code: Select all
// Identify transposed A4 & A5 connections, flash A4 4x and A5 5x continuously.
void setup() {
pinMode(A4, OUTPUT);
pinMode(A5, OUTPUT);
pinMode(13, OUTPUT);
}
void loop() {
digitalWrite(13, HIGH); // turn the LED on
for (int i=0; i<4; ++i) {digitalWrite(A4, HIGH); delay(200); digitalWrite(A4, LOW); delay(200);}
digitalWrite(13, LOW); // turn the LED off
for (int i=0; i<5; ++i) {digitalWrite(A5, HIGH); delay(200); digitalWrite(A5, LOW); delay(200);}
}