#include int tempPin = A0; // Selects the input pin for the temperature sensor // INPUT void setup() { Serial.begin(9600); pinMode(tempPin,INPUT); // TEMP sensor is in input pin A0 } void loop() { // Read an analog input on tempPin A0, and convert it to voltage. int sensorValue = analogRead(tempPin); // Reads and stores the anaog input value coming from the temp sensor pin byte low = lowByte(sensorValue); byte high = highByte(sensorValue); Serial.write(1); Serial.write(2); Serial.write(3); Serial.write(4); Serial.write(low); Serial.write(high); Serial.write(sensorValue); // Sends the sensorValue coming from the sensor to the microcontroller as a binary value delay(500); }