I am doing a project using an FSR (Force Sensitive Resistor), I'm currently reading values with no problem every 100milis. I want to output via Serial.print the highest value, I've read.
I am having a hard time doing so. The project is use to "measure" the strength some projectiles hit the sensor. I want to get the highest value.
This is the code I have until now.
int fsrPin = 0; // the FSR and 10K pulldown are connected to a0
int fsrReading; // the analog reading from the FSR resistor divider
void setup(void) {
// We'll send debugging information via the Serial monitor
Serial.begin(9600);
}
void loop(void) {
fsrReading = analogRead(fsrPin);
Serial.print("Analog reading = ");
Serial.println(fsrReading); // the raw analog reading
delay(100);
}
ifand>(Greater-Than).delay()in your code at all.