Hello world of arduino and beyond!
I am trying to use flexiforce pressure sensor but i have come into quite a pickle.My circuit is fine. It is standard of what you would normally find online when looking it up. One pin of the flexiforce sensor goes to 5V another to a 1 mega ohm resistor that goes to GND, in parallel to pin A0. I has the circuit and it doesn't seem to be the problem. the problems appears when i try to read from analogue pin A0. I went on all of the sites like parallaax and sparkfun and every code is virtually the same. When i upload the codes the serial monitor reads 0 V which is fine, but sometimes in between the results values goes to 267 or 327 without touching it). Could anyone help us with our codes and circuits? Urgent.
Please read and follow the directions in the "How to use this forum" post.
My circuit is fine.
Your circuit is not fine for at least two reasons.
First, this statement indicates that the input pin is floating:
sometimes in between the results values goes to 267 or 327 without touching it
Post a hand drawn circuit diagram.
Second, this is a bad idea:
another to a 1 mega ohm resistor that goes to GND, in parallel to pin A0.
The input impedance to the ADC must be less that 10K Ohms for proper function. If you MUST use a 1 MOhm resistor, put a 1 nF capacitor in parallel with it.
1 nF big enoug? I usually see 10-100 nF suggested.
The cap merely has to charge the 14 pF ADC sample and hold capacitor, so yes, 1 nF is more than "big enough".