int sensorPin1 = 4; // analog input pin for sensor 1 int sensorPin2 = 5; // analog input pin for sensor 2 int sensorPin3 = 0; // analog input pin for sensor 3 int ledPin = 13; // select the pin for the LED int val = 0; // variable to store the value coming from the sensor int val2 = 0; // variable to store the value coming from the sensor byte val3 = 0; int THRESHOLD = 100; // value 3 has an example threshold; if the received value is less than this, a 0 is sent to the serial port void setup() { beginSerial(9600); pinMode(ledPin, OUTPUT); // declare the ledPin as an OUTPUT } void loop() { val = analogRead(sensorPin1); // read the value from the sensor val2 = analogRead(sensorPin2); // read the value from the sensor val3 = analogRead(sensorPin3); // read the value from the sensor if (val3 < THRESHOLD) { // gate level for the sensor val3 = 0; } printString("A"); printInteger(val); serialWrite(10); printString("B"); printInteger(val2); serialWrite(10); printString("C"); printInteger(val3); serialWrite(10); delay(20); }