Im using a potentiomenter to adjust the blinking rate of my diode, and im trying to output the read values + the modified time value into my serial monitor, but it gives me some wierd numbers.
sensorValue ranges from 0-1024
heres what i get from the monitor
sensor = 0
timer = 0
-1279
sensor = 9
timer = 2295
-1279
sensor = 93
timer = 23715
-1279
sensor = 1023
timer = -1279
-1279
Serial.print("sensor = " );
Serial.println(sensorValue);
Serial.print("timer = " );
Serial.println(sensorValue*255);
Serial.println(1023*255); // added a test to see if it was the read value causing the errors.
delay(sensorValue*255);
Is there a limitation on how large an integer the println can print? Or am im doing it wrong ?
Please help :)
-Thomas