[SOLVED]Decoding WEBHOOK data

Hi there, I’ve recently purchased a photon particle and had a great start…until recently.
Long story short I have Photon 1 publishing 2 events privately.
Photon#2 is subscribed to these events. Ive checked and i DO receive this data when an event occurs.
However, photon2 is meant to receive data and display it. When i display the received data it gives me some gibberish (i can speculate it is something in ASCII). For example, instead of data “22.8” it displays “16841 …”

void myHandler(const char *event, const char *data) {
matrix.fillScreen(0);
Particle.publish(“Recieved Temp”, String(data), PRIVATE);
temp_C1=String(‘data’);//this is where i assume something goes wrong
}

Earlier in the program i declare temp_C1 as a string and correct information is displayed

String temp_C1=“NA”

HELP ME PLEASE =(((

@Dave

FIXED IT!
well all i had to do is just use

temp_C1=data;
instead of
temp_C1=String(‘data’);

2 Likes

Glad to hear!

1 Like