My project is very simple but stuck at the bluetooth connectivity. My wiring diagram is shown at the end using flora V3 and Bluefruit Le and velostat pressure sensitive material.
I am using this code to get responses when I apply pressure on the velostat:
Code: Select all
int fsrPin = 10; // the FSR and 1M pulldown are connected to a0
int fsrReading; // the analog reading from the FSR resistor divider
//#define BLUEFRUIT_HWSERIAL_NAME Serial1
void setup(void) {
Serial.begin(9600);
}
void loop(void) {
fsrReading = analogRead(fsrPin);
Serial.print("Analog reading = ");
Serial.print(fsrReading); // print the raw analog reading
if (fsrReading < 0) {
Serial.println(" - No pressure");
} else if (fsrReading < 0.1) {
Serial.println(" - Light touch");
} else if (fsrReading < 1) {
Serial.println(" - Light squeeze");
} else if (fsrReading < 4) {
Serial.println(" - Medium squeeze");
} else {
Serial.println(" - Big squeeze");
}
delay(50);
}
Code: Select all
Adafruit Factory Reset Example
------------------------------------------------
Initialising the Bluefruit LE module: OK!
Performing a factory reset:
AT+FACTORYRESET
<- Couldn't factory reset