How do I send the value of my PH 4502c sensor to the Thinger?

Hi Guys,
it’s my first project with thinger, I want to send the value of PH to the thinger. I am using an ESP8266 MCU V2 and a PH4502C sensor.

const int analogInPin = A0;
int buf[10];
int temp=0;
unsigned long int inValue;
void setup() {


void loop() {
for(int i=0; i<10;i++){
buf[i]= analogRead(analogInPin);
for(int i=0; i<9; i++){
for(int j=i+1;j<10;j++){
temp= buf[i];
for(int i=2; i<8; i++){
inValue= inValue + buf[i];
float PHVol= (float)inValue1003.3/1024/6;

Serial.print("Voltaje mv =");

float PH= -0.0554*PHVol +22.236;
Serial.print("PH =");


I already managed to send the reading of the dht22 sensor, but I can’t adapt it to send the ph reading, Please help


What is the issue?

Please post the code in a proper format, select it all and press the “</>” at the toolbar, this helps us to read the code.

On the other hand, I would recommend you to make your device report it locally at the serial console, once achieved this, is easy to integrate to upload to the platform.

Hope this helps.