/* Battery Test Serial Writer * Sends a serial heartbeat that indicates that battery power * is still sufficient. When the battery dies, the heartbeat will stop */ int ledPin = 13; // select the pin for the LED int blinkerPin=12; void setup() { pinMode(ledPin,OUTPUT); // declare the LED's pin as output pinMode(blinkerPin,OUTPUT); // declare the LED's pin as output beginSerial(9600); // connect to the serial port blinkLED(ledPin, 2, 100); } void loop () { blinkLED(blinkerPin, 1, 1); int printValue = 255; // int printValue = analogRead(0)/4; Serial.println(printValue); delay(998); } // this function blinks the an LED light as many times as requested void blinkLED(byte targetPin, int numBlinks, int blinkRate) { for (int i=0; i