Page 1 of 1

Identify transposed A4 & A5 on ebay boards

Posted: 17 Mar 2018, 16:17
by Phil_G
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.

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);}
 }

Re: Identify transposed A4 & A5 on ebay boards

Posted: 18 Mar 2018, 00:27
by _AL_
Brilliant.

Al