I am trying to read an analog voltage on my Seeeduino Film - using the exact same circuit on my ArduinoUno works exactly as expected and I receive a value of ~335 (expected value), but when I wire it up to my Film I get a constant result of 1023 in return.
I am using 2 10k resistors in a standard potential divider circuit.
Please see my code below:
[code]int val;
void setup()
{
pinMode(1, INPUT);
Serial.begin(9600);
}
void loop()
{
val = analogRead(1); // read the input pin
Serial.println(val);
Serial.println(val);
delay(1000);
}[/code]
My code is as simple as it can get.
It is definitely wired up to Analog pin 1 - all other pins return floating value as would be expected when not tied to anything.
Does anyone have any suggestions?
Regards,
Morrolan