Hello,
I am getting this error msg when uploading: avrdude: ser_drain(): read error: Device not configured
I am trying to read values from a photoresistor:
Green goes to A0
Red goes to 5V
Black goes to GND
and the code for it:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
}
// the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
// print out the value you read:
Serial.println(sensorValue);
delay(10);
}
I am using a leonardo, is there something I am missing?
I can press reset and then upload and it's uploading fine, but when I touch the photoresistor, there is no value output.
any ideas?