/* a program that reads sensor data from pin a3 and sends the data back to the computer the light on the tearDrop board will turn on if the incoming sensor readings are below a certain threshold */ int sensorPin1 = 3; //sensor is attached to pin a3 int sensorValue; //a variable to hold the values we read from the sensor int boardLED = 13; //variable for the LED that is on the tearDrop board void setup() { Serial.begin(9600); pinMode(boardLED, OUTPUT); //set the boardLED pin to be an output } void loop() { sensorValue = analogRead(sensorPin1); Serial.println(sensorValue); if (sensorValue < 512) { digitalWrite(boardLED, HIGH); //turn on the boardLED } else { digitalWrite(boardLED, LOW); //turn off the boardLED } delay(100); //wait for 100 milliseconds (1/10 of a second) }