Hello
I am trying to connect a 0.5v-4.5v pressure transducer to blynk via esp32
I am aware i am above the 3.3v but i found info that said the board may handle it.
HYDAC | HDA 4748-H with HSI sensor recognition
I had the code working on UNO with serial monitor, now it wont work on esp32
the sensor has only three wires at the moment:
output - GPIO 34
12vdc in
ground
It appears blynk is connecting via BLE
I am getting nothing on the serial monitor, i fear the excess voltage may be too much to read?
#define BLYNK_PRINT Serial
#define BLYNK_USE_DIRECT_CONNECT
#include <BlynkSimpleEsp32_BLE.h>
#include <BLEDevice.h>
#include <BLEServer.h>
BlynkTimer timer; // Create a Timer object called "timer"!
const int VOL_PIN = 34;
char auth[] = "removed";
void setup()
{
// Debug console
Serial.begin(9600);
Serial.println("Waiting for connections...");
Blynk.setDeviceName("Blynk");
Blynk.begin(auth);
}
void myTimerEvent()
{
int value;
float volt;
float BAR;
float PSI;
float KPA;
value = analogRead( VOL_PIN );
volt = value * 4.5 / 4095.0;
BAR = value * 16 / 4095.0;
PSI = value * 235.2 / 4095.0;
KPA = BAR * 100;
Serial.print( " Value: " );
Serial.println( value );
Serial.print( " Volt: " );
Serial.println( volt );
Serial.print( " BAR: " );
Serial.println( BAR );
Serial.print( " PSI: " );
Serial.println( PSI );
Serial.print( " KPA: " );
Serial.println( KPA );
delay( 200 );
}
void loop()
{
Blynk.run();
timer.run(); // BlynkTimer is working...
}