I am having some issues with a simple program. I am pretty new to Particle and C++ so assume you’re talking to someone with no idea what they’re doing.
int led = D6;
void yaddayadda(String event, String data) {
if (Particle.subscribe("lit","on")) {
digitalWrite(led,HIGH);
} else if (Particle.subscribe("lit","off")) {
digitalWrite(led,LOW);
}
}
void setup() {
pinMode(led,OUTPUT);
Particle.subscribe("lit", yaddayadda);
}
void loop() {
}
The error message I received is:
"demonstrationled.ino:6:38: no matching function for call to ‘CloudClass::subscribe(const char [4], const char [3])’“
and
"demonstrationled.ino:8:46: no matching function for call to ‘CloudClass::subscribe(const char [4], const char [4])’”
I have been all over the forums and have no idea what’s going on. Please help!