View Full Version : Flexiforce and arduino

09-01-2011, 10:35 AM
Anyone have a working arduino code for the flexiforce pressure sensor? I am trying to get an ensemble of them working, but I need to be able to crawl before I can walk. I am having lots of trouble just getting this thing to work. Any help is much appreciated, and thank you in advance!

09-02-2011, 01:31 PM
Flexforce pressure sensors output their values in an analog signal so all you really need to do is connect it to one of your analog pins then run this code.

int sensorValue = 0; //variable to store the sensor value in

void setup()
// initialize serial communications at 9600 bps:

void loop()
// read the analog in value:
sensorValue = analogRead(5); //reads pin 5

Serial.print("sensor = " );
Serial.println(sensorValue); //print the number to the serial port


It will print the analog values of the sensor to the serial port when it is connected to pin 5. If you need any more clarification feel free to ask :)

09-06-2011, 10:43 AM
Thanks so much for your help. I am getting a continuous data stream on which the Flexiforce has no effect. I am not using the op amp as recommended in the schematic, (I was told that it wasn't necessary) and using a 10k resistor. My goal is to transfer this info over to MIDI but it is turning out to be quite the task.

Thanks again for your help, it is very much appreciated.