heemanth
Published © CERN-OHL

Arduino digital pin testing with serial monitor

I made this program to check the status of the digital so we can see which pin are working or not. and please give a like.

BeginnerProtip3,460
Arduino digital pin testing with serial monitor

Things used in this project

Story

Read more

Schematics

boad testing

Code

digital_pin_check.ino

Arduino
int dp, dn;

void setup() {
  Serial.begin(9600);
  dn = 13; //total no. of digital pins:
  
}

void loop() {
for (dp =0; dp <= dn; dp++) 
  //    \/ :
  // enter the pin number you want to start from :
  {
    pinMode(dp,INPUT);
   int dps = digitalRead(dp);
   Serial.print("<");
    Serial.print(dp);
    Serial.print("-");
      Serial.print(dps);
        Serial.print("> ");
    delay(500);
    
    }
  Serial.println(" ");
}

Credits

heemanth
0 projects • 0 followers
Contact

Comments

Please log in or sign up to comment.