Hi everyone
I don’t understand how to take data from other node. For example, in the first node i have this code
thing[“LDR”] >> [](pson& out){
out = analogRead(LDR);
};
And i want a second node to take this value and make something. So i write this code on second node
unsigned int current_lum = 0;
thing[“LDR”] << [](pson& in){
if (in.is_empty()){
in = current_lum;
} else {
current_lum = in;
}
};
void loop() {
thing.handle();
Serial.println(current_lum); //value is always zero
}
What is the mistake? I have the free license so far
Thanks in advance!