Identify transposed A4 & A5 on ebay boards

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

Identify transposed A4 & A5 on ebay boards

Post by Phil_G » 17 Mar 2018, 16:17

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 (HIGH is the voltage level)
  
   digitalWrite(A4, HIGH);   // turn the LED on (HIGH is the voltage level)
   delay(200);               // wait for a second
   digitalWrite(A4, LOW);    // turn the LED off by making the voltage LOW
   delay(200);               // wait for a second
   digitalWrite(A4, HIGH);   // turn the LED on (HIGH is the voltage level)
   delay(200);               // wait for a second
   digitalWrite(A4, LOW);    // turn the LED off by making the voltage LOW
   delay(200);               // wait for a second
   digitalWrite(A4, HIGH);   // turn the LED on (HIGH is the voltage level)
   delay(200);               // wait for a second
   digitalWrite(A4, LOW);    // turn the LED off by making the voltage LOW
   delay(200);               // wait for a second
   digitalWrite(A4, HIGH);   // turn the LED on (HIGH is the voltage level)
   delay(200);               // wait for a second
   digitalWrite(A4, LOW);    // turn the LED off by making the voltage LOW

   digitalWrite(13, LOW);   // turn the LED on (HIGH is the voltage level)

   digitalWrite(A5, HIGH);   // turn the LED on (HIGH is the voltage level)
   delay(200);               // wait for a second
   digitalWrite(A5, LOW);    // turn the LED off by making the voltage LOW
   delay(200);               // wait for a second
   digitalWrite(A5, HIGH);   // turn the LED on (HIGH is the voltage level)
   delay(200);               // wait for a second
   digitalWrite(A5, LOW);    // turn the LED off by making the voltage LOW
   delay(200);               // wait for a second
   digitalWrite(A5, HIGH);   // turn the LED on (HIGH is the voltage level)
   delay(200);               // wait for a second
   digitalWrite(A5, LOW);    // turn the LED off by making the voltage LOW
   delay(200);               // wait for a second
   digitalWrite(A5, HIGH);   // turn the LED on (HIGH is the voltage level)
   delay(200);               // wait for a second
   digitalWrite(A5, LOW);    // turn the LED off by making the voltage LOW
   delay(200);               // wait for a second
   digitalWrite(A5, HIGH);   // turn the LED on (HIGH is the voltage level)
   delay(200);               // wait for a second
   digitalWrite(A5, LOW);    // turn the LED off by making the voltage LOW

   
 }


User avatar
_AL_
Posts: 89
Joined: 17 Feb 2018, 01:09
Location: Sydney Australia

Re: Identify transposed A4 & A5 on ebay boards

Post by _AL_ » 18 Mar 2018, 00:27

Brilliant.

Al

Post Reply