Hi there!
I connected 5V to analog pin 0 and run this code:
int sensorPin = 0; // select the input pin for the potentiometer// select the pin for the LED
int sensorValue = 0; // variable to store the value coming from the sensor
void setup() {
Serial.begin(9600);
}
void loop() {
sensorValue = analogRead(sensorPin);
Serial.print(sensorValue);
Serial.print("\n");
}
All i got is ÿ as output to serial monitor, what's up with that? Shouldn't it give 1023 as output?
Have to use serial.print instead of serial.write :
