hardware.pin8.configure(ANALOG_IN); local voltage = hardware.voltage(); server.log(format("3.3v PIN READING %.2f V", voltage)); server.log("Hardware Configured"); function GetPin8Voltage() { local reading = hardware.pin8.read(); local voltage = reading * (3.28 / 65535.0); server.log("Device Detecting " + voltage + " volts"); //Show what we got agent.send("data",voltage); imp.wakeup(30, GetPin8Voltage); //Do this again in 1 minute } GetPin8Voltage();