int firstSensor = 0; // first analog sensor int secondSensor = 1; // second analog sensor int inByte = 0; // incoming serial byte void setup() { // start serial port at 9600 bps: Serial.begin(9600); } void loop() { // if we get a valid byte, read analog ins: if (Serial.available() > 1) { // get incoming byte: inByte = Serial.read(); // read first analog input, divide by 4 to make the range 0-255: firstSensor = analogRead(0)/4; // delay 10ms to let the ADC recover: delay(10); // read second analog input, divide by 4 to make the range 0-255: secondSensor = analogRead(1)/4; // send sensor values: Serial.print(firstSensor,BYTE); Serial.print(secondSensor,BYTE); } }