Skip to content

Instantly share code, notes, and snippets.

View Stuckeymax's full-sized avatar

Stuckey McIntosh Stuckeymax

  • Recon Aeronautics
  • Atlanta
View GitHub Profile
// 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