diff --git a/.gitignore b/.gitignore index c0bef08..be77c19 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ config.h *.bin *.elf +configs/ diff --git a/config.h.example b/config.h.example index f65469e..77e8c74 100644 --- a/config.h.example +++ b/config.h.example @@ -12,15 +12,15 @@ // // We would expect the webhook to return something like: // -// [1 0 1] +// [1, 0, 1] // // to activate the momentary switch, (pin 5) deactivate the first // latched switch, (pin 8) and activate the second latched switch. (pin 10) const int NUM_PINS = 3; const int PIN_MAP[NUM_PINS][2] = { - {5, 1}, - {8, 1}, - {10, 1} + {5, 1}, + {8, 1}, + {10, 1} }; // The signing/root certificate for your webhook site. diff --git a/smartswitch.ino b/gpio-webhook-arduino.ino similarity index 100% rename from smartswitch.ino rename to gpio-webhook-arduino.ino diff --git a/readme.md b/readme.md index b043293..5494121 100644 --- a/readme.md +++ b/readme.md @@ -1,13 +1,14 @@ # Control I/O pins with a webhook This is an Arduino IDE sketch for a "smart" controller that can activate pins -based on the state of some webpage. The motivating use cases are: +based on the state of some webpage. (designed to be driven by [gpio webhook server](https://git.annabunch.es/annabunches/gpio-webhook-server)) +The motivating use cases are: * Controlling a PC power switch remotely, using a transistor wired to the power switch pins * Lighting specific LEDs to create a remotely controlled 'traffic light'. This sketch currently targets only the ESP8266, and will probably not work with other -microcontrollers. Support for other boards may come if I run out of ESP8266's. +microcontrollers. Support for other boards may come if I run out of ESP8266s. ## Configuration @@ -54,4 +55,4 @@ state to '0' after the page is served / the webhook is consumed. ## Future Improvements * make it actually work... -* use WifiManager? \ No newline at end of file +* use WifiManager?