ESP Light

From ElectroDragon
Jump to: navigation, search

Quick Start Guide

  • See the general board setup on this page.
  • Set unique and complex your own control ID (module ID and topic), for example named ID is electroled, than full ID is "ESP-electroled"
  • Control command is, for exmaple, change light to green, hex command is #00ff00.


Hardware

Board Definition and jumper select

  • Input power jumper
  • On board left side is power supply in, on board right side pin definition is W B R G V
  • If your RGB LED strip pin definition is V G R B you can connect to terminal bottom 4 port directly via the connetor cable in package.
W - W4 single white LED strip
B - RGB blue channel 
R - RGB red channel (or ws2812 gnd, select by jumper)
G - RGB green channel (or ws2812 io2, select by jumper)
V - power supply for all other channels
  • Power supply, use 12V or 24V power supply that can match to LED strip power
Board Pin Description Jumper Select
Terminal_in (->Vin power) Power supply for On Board ESP8266 Control (27-5V) 27-5V input (default) <Vin> 5V direct input
Terminal_in (->V_LED power) Power supply for LED Strip (27-5V, normally 12V or 24V) 27-5V input (default) <Vin> 5V direct input
  • RGB/WS2812 output Jumper
Board Pin Jumper Select for RGB (default) Jumper Select for WS2812
G RGB red channel (or single white W4) WS2812 IO2 signal
R RGB green channel (or single white W3) or WS2812 ground
B RGB blue channel (or single white W2) -
W Single white W1 -

Pin Definition and Configuration

  • Press BTN0 (GPIO0) down, and power up the board, will enter into firmware flash mode
  • Following pin definition also compare to H801
ESP8266 Pin ESP Light Pin Other similar board pin (H801)
15 R R - Red
13 G G - Green
12 B B- Blue
14 W1 - White W1 - White
4 IIC W2 - White
1 ESP-Tx Signal green led
3 ESP-Rx ESP-Rx
5 IIC Power red led
2 WS2812 signal ESP-Tx

Usage

WS2812 for nodeMCU

uart.setup(0, 115200, 8, uart.PARITY_NONE, uart.STOPBITS_1, 1) -- re-init uart in case
ws2812.init()
ws2812.write(string.char(255, 255, 255, 255, 0, 0)) -- turn the two first RGB leds to green

Commands send in H801 protocol

  • Install sendip in linux
  • commands should be: sendip -p ipv4 -is 192.168.1.81 -p udp -us 5070 -ud 5060 -d "Hello" -v 192.168.1.81


Reference

Orignal Firmware avaialble here. Demo code

Topics

APP MQTT Dashboard commands reference

  • use in MQTT Dashboard
Send Function Demo code
1ON/1OFF, 2ON/2FF Turn ON or OFF
0 ~ 255 Set light brightness
RGB Color Hex value: #6FC2F4 Supported
RGB Color rgb(244,44,244)