//jleblanc 10.10.06 int analogtotal=0; int loops=0; int analogpin = 0; int analogval = 0; void setup () { Serial.begin (9600); //initialize the serial reader at 9600 baud rate } void loop () { analogval = analogRead(analogpin); //assign the potpin to variable pot value analogtotal = analogtotal + analogval; loops++; if(loops > 10) { //Here we assume that 253 is 5 volts because we have split the incoming //power using 30K and then 10K analogtotal = 50*(analogtotal/loops)/253; Serial.println( analogtotal ); analogtotal=0; loops=0; } delay (10); }