#include //library to replace hardware serial SoftwareSerial myserial(3, 4); // TX and RX pins (transmit and recieve) #define tempPin A1 //Defining the pin A1 as the data pin int val; void setup() { myserial.begin(9600); //serial begins at 9600 baud rate pinMode(A1, INPUT); //pin A1 becomes an input now } void loop() { val = analogRead(tempPin); float mv = ( val / 1024.0) * 5000; //mapping analog values to relevant temperature readings float cel = mv / 10; float farh = (cel * 9) / 5 + 32; myserial.print((char)cel); delay(10); }