Professional Documents
Culture Documents
h> //only used for remote control switches, not used if you have
a relay
void setup(void) {
// We'll send debugging information via the Serial monitor
Serial.begin(9600);
// If you want to set the aref to something other than 5v
analogReference(EXTERNAL);
//enable RC switch transmissions on pin 10.
mySwitch.enableTransmit(8);
}
void loop(void) {
tempReading = analogRead(tempPin);
// converting that reading to voltage, which is based off the reference voltage
float voltage = tempReading * aref_voltage;
voltage /= 1024.0;
delay(1000);
}