Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sample Arduino code of Internet connected LED
//definitions for jumpwire.io
#define jumpwire_io_token "Set_your_token"
#define jumpwire_io_project "A"
#define your_WiFi_SSID "Set_your_ssid"
#define your_WiFi_password "Set_your_password"
#define your_ESP8266_baud_rate 115200
//put your definitions here
//put your global variables here
void setup() {
jumpwireIoSetup(); //always put this code in setup()
//put your code here
pinMode(13, OUTPUT);// initialize digital pin 13.
}
void loop() {
jumpwireIoLoop(); //always put this code in loop()
//put your code here
}
void Catch(char key, float value) {
//this function is called when byte values on jumpwire.io server are changed
//put your code here
if (key == 'A') {
if(value == 0){ //if value of key A is 0
digitalWrite(13, LOW); //turn OFF LED
}
else if(value == 1){ //if value of key A is 1
digitalWrite(13, HIGH); //turn ON LED
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.