#define BLU_LED_PIN 25 #define GRN_LED_PIN 16 #define RED_LED_PIN 17 #define BLINK_RATE 500 // half a second int count = 0; #ifdef BLU_LED_PIN // if not defined then code is ignored void setup() { // put your setup code here, to run once: pinMode(BLU_LED_PIN, OUTPUT); pinMode(GRN_LED_PIN, OUTPUT); pinMode(RED_LED_PIN, OUTPUT); #ifdef DEBUG Serial.begin(9600); #endif } #endif void loop() { // high and low are reversed because it's already connected to 3.3V // put your main code here, to run repeatedly: digitalWrite(GRN_LED_PIN, HIGH); digitalWrite(BLU_LED_PIN, HIGH); digitalWrite(RED_LED_PIN, HIGH); delay(BLINK_RATE); digitalWrite(RED_LED_PIN, LOW); char c = Serial.read(); delay(BLINK_RATE); count++; Serial.print("Count:"); Serial.println(count); //print line (adds a new line) }