forked from rstephan/ArtnetWifi
-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
jonmatifa edited this page Feb 9, 2017
·
2 revisions
Here are a few quick tips I discovered while working on this project for myself.
I worked with an ESP-01 with a 1M flash module, but these instructions should be similar for other models.
- Computer with Arduino software and ESP boards installed (see below)
- ESP-01 (or simlar) module board
- ws2812b / Adafruit NeoPixel or similar addressable led strip
- FTDI or similar USB to TTL board capable of operating at 3.3v (search 'FTDI' on eBay, Aliexpress, Amazon, etc.)
- A ~1000 Ohm resistor
- A breadboard with jumper cables is very helpful and highly recommended
- Install Arduino, I used version 1.6.11 https://www.arduino.cc/en/Main/Software
- Add the ESP board to the Arduino board manager, https://github.com/esp8266/Arduino (hint, enter http://arduino.esp8266.com/stable/package_esp8266com_index.json into the additional boards manager URL)
- Download this project into your local Documents/Arduno/Libraries folder (location depends on system, see https://www.arduino.cc/en/Guide/Libraries)
- DMX512 is a protocol for controlling multiple light fixtures, capable of handling 512 channels per connection (usually a DMX cable)
- ArtNet is a DMX512 style protocol that works over ethernet, but it can carry multiple "universes" each of which carries 512 channels
- Furthermore, ArtNet can can have mutliple sets of universes called "nets" and "subnets", along with "universe" they are identified by a simple number usually starting with net 0, subnet 0, universe 0
- Each RGB led uses 3 channels, one for each color, so a matrix of 25x10 leds would actually take 750 channels exceeding the limit of DMX512 or a single ArtNet universe
- Luckily, a single ArtNet device is only limited by its inherent capabilities, so you can keep adding universes so long as the hardware/network is capable of keeping up
- 512 / 3 = 170.6666... so effectively you get 170 RGB channels per DMX512 signal or ArtNet universe (equaling 510 monochrome channels, wasting 2 channels which we wont worry about)
- So our 25x10 matrix has to be addressed into two universes, channels 0-509 in universe 0 (which correspond to RGB leds 0-170) and channels 0-237 in universe 1 (which then correspond to RGB leds 171-249)... larger led matrices would occupy even more universes in a similar fashion
- The ArtNet wifi code allows you to set your starting universe to any number you would like, typically either 0 or 1 depending on whether or not the software you plan on using with it expects either starting number. Therefore in the example above, "universe 0" would be replaced by universe 1, and "universe 1" would become universe 2, etc.
- The ESP8266 is a bit more tricky to program than an a typical arduino. If you have experience working with the pro mini, or another style that requires a TTL adapter (like the FTDI), then you'll have a bit less to deal with here.
- The ESP8266 are typically packaged with the ESP8266 system-on-chip itself along with some kind of companion flash module, the ESP8266 itself has an internal rom that can boot in a few different modes, most notably a mode to write to the flash module and another one to boot from it
- Esptool (https://github.com/espressif/esptool) is a very helpful utility and can assist in diagnostics and erasing the flash on the ESP board. The easiest way to install it is to get python with pypi and run 'pip install esptool'