Skip to content

Instantly share code, notes, and snippets.

@jacepark12
Created July 23, 2019 08:43
Show Gist options
  • Select an option

  • Save jacepark12/3f7e7c6faa473ac8a7e7fdff9bec84a1 to your computer and use it in GitHub Desktop.

Select an option

Save jacepark12/3f7e7c6faa473ac8a7e7fdff9bec84a1 to your computer and use it in GitHub Desktop.
#include <Sunshower.h>
const char* apiKey = "apiSecretKey";
void setup() {
// ESP 모듈 initializing
Sunshower.setup("wifi", "password", apiKey);
}
void loop() {
int flag = Sunshower.receive("bucketKey");
if (flag == 1) {
// turn on LED
}
//send data to sunshower
int data = 10;
Sunshower.send("bucketKey",data);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment