Pages: [1]   Go Down
Author Topic: [SOLVED]5V -> analog input gives weird symbols  (Read 409 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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() {

void loop() {
  sensorValue = analogRead(sensorPin);    

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 :smiley
« Last Edit: August 12, 2010, 02:50:48 pm by retundo » Logged

Pages: [1]   Go Up
Jump to: