1 2 3 4 5 6 7 8
Arduino arduino; FSR-400 sensor; R10kΩ R1; sensor- = arduino.Gnd; sensor+ = arduino.A1 sensor+ = R1-; R1+ = arduino.Gnd;
1 2 3 4 5 6 7 8 9 10 11
const int iSensor = 1; int vSensor = 0; // in int[0:.1024] void setup() { Serial.begin(9600); } void loop() { vSensor = analogRead(iSensor); Serial.write((byte)(vSensor/4)); delay(50); }