Hello friends.
I am facing a problem. again.
I am now experimenting with the lib: GitHub - GreenPonik/DFRobot_ESP_PH_BY_GREENPONIK: Read PH on ESP32 by using Gravity: Analog pH Sensor / Meter Kit V2, SKU:SEN0161-V2
Here i try to get the example, that is on the front of the GITHUB rasp to work.
#include "DFRobot_ESP_PH.h"
#include <EEPROM.h>
DFRobot_ESP_PH ph;
#define ESPADC 4096.0 //the esp Analog Digital Convertion value
#define ESPVOLTAGE 3300 //the esp voltage supply value
#define PH_PIN 35 //the esp gpio data pin number
float voltage, phValue, temperature = 25;
void setup()
{
Serial.begin(115200);
EEPROM.begin(32);//needed to permit storage of calibration value in eeprom
ph.begin();
}
void loop()
{
static unsigned long timepoint = millis();
if (millis() - timepoint > 1000U) //time interval: 1s
{
timepoint = millis();
//voltage = rawPinValue / esp32ADC * esp32Vin
voltage = analogRead(PH_PIN) / ESPADC * ESPVOLTAGE; // read the voltage
Serial.print("voltage:");
Serial.println(voltage, 4);
//temperature = readTemperature(); // read your temperature sensor to execute temperature compensation
Serial.print("temperature:");
Serial.print(temperature, 1);
Serial.println("^C");
phValue = ph.readPH(voltage, temperature); // convert voltage to pH with temperature compensation
Serial.print("pH:");
Serial.println(phValue, 4);
}
ph.calibration(voltage, temperature); // calibration process by Serail CMD
}
float readTemperature()
{
//add your code here to get the temperature from your temperature sensor
}
The build runs perfect and i also see the right values in my serial monitor.
My problem now: To start the calibration for the PH measure, the code expects a command in thr serial monitor. But when i enter the Command,for example "ENTERPH" in the terminal or the serial monitor (are those both the same things?) in the platformio IDE i get the message that the command wasnt recoginzed.
The path of my Serialmonitor or terminal is: PS C:\Users\manue\Documents\PlatformIO\Projects\test>
and "test" is my projectfolder. So i think the path is right.
How can i check if my Serial monitor or terminal works properly? Maybe its some kind of platformio-setting-issue.
I am frustrated. Hope someone has the right idea
thank you