This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Somfy motorized drapery controller | |
#include <ESP8266WiFi.h> | |
#include <ESP8266WebServer.h> | |
#include <WiFiUdp.h> | |
#include <functional> | |
#define LEDBLU 2 // Controls blue LED on WiFi module | |
#define LEDRED 16 // Controls red LED on NodeMCU board | |
#define LEDGRN 4 // Added to include 3rd function (MY) control and added green LED at D2/GPIO4 of NodeMCU v1.0 ESP8266 board | |
// Schematic is pin D2 to 470 ohm resistor -/\/\/\- to green LED cathode -|<- anode to 3V3 pin; green LED is on when D2 false | |
// Connect ESP8266 to Somfy transmitter ground; ESP8266 D0 to /\ button, D2 to MY button, D4 to \/ button; may need to reverse /\ \/ depending on personal preference |