Identify transposed A4 & A5 on ebay boards

List all your sketches here
Post Reply
User avatar
Phil_G
Posts: 596
Joined: 15 Feb 2018, 23:32
Contact:

Identify transposed A4 & A5 on ebay boards

Post 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);}
 }
User avatar
_AL_
Posts: 160
Joined: 17 Feb 2018, 01:09
Location: Sydney Australia

Re: Identify transposed A4 & A5 on ebay boards

Post by _AL_ »

Brilliant.

Al
Post Reply