Fragmenting one overarching/common question into multiple threads isn't best practice.
However, when you use Web IDE, you should click the SHOW RAW button to see more background info about the error message.
Ambiguity errors usually are caused by multiple use of the same name for different purposes and the first step to remedy such an issue is to try renaming the offending variable.
Thanks. I will continue this issue in this thread. The other thread was started regarding wifi going offline.
I have this code, but still can’t figure out how to write the sprintf line
int rssi = 0;
char data[16];
void wifi_status() {
rssi = WiFi.RSSI();
snprintf( //I can't figure out the syntax of this line
Particle.publish("rssi", data, PRIVATE);
Blynk.virtualWrite(V50, rssi);
}
OK, then you may want to read up on printf() first.
This will provide you with the basics of formatting strings
Once that has become clear you can apply that insight to snprintf() where s stands for Storage and n for max Number of characters.
Armed with that insight you will be able to interpret how and why the code above does what it does and can solve your immediate question and will also be able to re-apply that insight over and over of further questions that may arise.
BTW, about this
this is the old syntax.
The modern version would be this
I believe the reason Signal is ambiguous is that there’s a class named Signal.
Renaming the global variable and every it’s used to signal (lower-case) should solve that problem. Or to be even safer, “mySignal” or something like that.