I’m sure the answer will be obvious, but I’m trying to use a webhook to get some JSON data (not doing anything with it yet)…for now I’m just trying to toggle and LED as a test to ensure the myHandler function is being called when the hook response occurs…but no blue LED for me…
int led = D7;
bool toggle = FALSE;
void setup() {
// Subscribe to the integration response event
Particle.subscribe("hook-response/La Jolla Tide", myHandler, MY_DEVICES);
pinMode(led, OUTPUT);
}
void loop() {
// Get some data
String data = String(10);
// Trigger the integration
Particle.publish("La Jolla Tide", data, PRIVATE);
if(toggle == TRUE) {
digitalWrite(led, HIGH);
}
// Wait 60 seconds
delay(60000);
}
void myHandler(const char *event, const char *data) {
// Handle the integration response
toggle = TRUE;
}