Closed sarkrui closed 4 years ago
Nothing related to Firebase library.
correction:
FSR402 is actually a strain guage or piezoresistive transducer. This transducer obtains resistance changes when force applied, then you can read it though analog pin through voltage divider circuit.
You should share your code for better investigation also circuit diagram or picture. Because of WiFi connection required more inrush current, make sure you have large capacitor connected to board Vcc (+3.3V) and GND for better voltage stability.
I also thought it shouldn't be related to the Firebase library...but things just couldn't work as intended and here's the code. FSR402_Firebase_Send.zip
You cannot use ADC2 (GPIO 2, 4, 12, 13, 14, 15, 25, 26, 2) with WiFi task, here is the issue.
Issue resolved by changing sensor pin to ADC1 pins.
Specs
const int sensorPin = 4; int pressureVal;
Issue
Hi @mobizt, my FSR402 works just fine without Firebase; But if I incorporate
Firebase-ESP32
into the code, the reading of the sensor pin outputs a constant value4095
for no reason.What I have tried
Here it's one piece of my code.
Do you have any idea where might go wrong? Thanks!