chipKIT® Development Platform

Inspired by Arduino™

Strange input problems HELP!

Created Sun, 20 May 2012 20:19:12 +0000 by strangecalibur


Sun, 20 May 2012 20:19:12 +0000

I dont know whats going on, when i test this on an arduino everything works perfectly but for some reason on the chipkit32 it does not.

What I have done is made a home made pressure pad then when you step on it the chipkit should measure the value but.....the only value i seem to get is 803....... even using this basic code below and a pot by itself and with a voltage divider i get no joy. The digital inputs appear to be doing the same thing to button presses. Anyone have an idea of whats going on?

/* AnalogReadSerial Reads an analog input on pin 0, prints the result to the serial monitor

This example code is in the public domain. */

void setup() { Serial.begin(9600); }

void loop() { int sensorValue = analogRead(A0); Serial.println(sensorValue, DEC); delay(1000); }


Mon, 21 May 2012 22:39:28 +0000

int sensorValue = analogRead(A0);

try "analogRead(0)" It looks to me like "A0" is supposed to work, but I'd rate it as a "possible source of problems." (which board and IDE version are you using?)