Rotary-Gecko/Code/Debug_Cable_Connection/Debug_Cable_Connection.ino

25 lines
444 B
Arduino
Raw Permalink Normal View History

2014-01-13 16:40:31 -06:00
//
// Debug_Cable_Connection.ino
//
// Created by Mr. Gecko's Media (James Coleman) on 1/12/14.
// No Copyright Claimed. Public Domain.
//
int testPin = 2;
int lastValue = 1;
void setup() {
Serial.begin(9600);
pinMode(testPin, INPUT_PULLUP);
}
void loop() {
int value = digitalRead(testPin);
if (value!=lastValue) {
Serial.print("Changed value ");
Serial.print(value);
Serial.print("\n");
lastValue = value;
}
}