Hi there,
Im very new to the Arduino scene and am having some trouble using multiple FSR's. Basically I have an LED wired to each individual FSR and want it to light up at full brightness whenever the FSR detects pressure, however, I can only ever get one to work at a time or both light up when one FSR detects pressure.
Here is the code I have currently written up:
int pressurePin1 = A1;
int LEDpin1 = 11;
int force;
int LEDpin2 = 10;
int pressurePin2 = A0;
void setup() {
pinMode(LEDpin1, OUTPUT), (LEDpin2, OUTPUT);
Serial.begin(9600);
}
void loop() {
force = analogRead(pressurePin1), (pressurePin2);
Serial.println(force);
if (force > 300)
{
digitalWrite(LEDpin1, HIGH), (LEDpin2, HIGH);
}
else
{
digitalWrite(LEDpin1, LOW), (LEDpin2, LOW);
}
delay(100);
}
All help and comments would be very greatly appreciated