Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mignon-p/esp-opc-server
Open Pixel Control server for ESP8266
https://github.com/mignon-p/esp-opc-server
adafruit-feather-huzzah esp8266 neopixels open-pixel-control
Last synced: about 1 month ago
JSON representation
Open Pixel Control server for ESP8266
- Host: GitHub
- URL: https://github.com/mignon-p/esp-opc-server
- Owner: mignon-p
- License: bsd-3-clause
- Created: 2017-01-25T17:54:23.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-12-04T21:28:09.000Z (about 5 years ago)
- Last Synced: 2024-09-06T11:07:21.819Z (4 months ago)
- Topics: adafruit-feather-huzzah, esp8266, neopixels, open-pixel-control
- Language: C++
- Homepage:
- Size: 319 KB
- Stars: 15
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This is an [Arduino][1] sketch which implements an
[Open Pixel Control][2] server for controlling [NeoPixels][3] from an
[ESP8266][5], such as the [Adafruit Feather HUZZAH][4].Here is an example circuit:
Bill of materials:
* [Adafruit Feather HUZZAH ESP8266][4]
* [74AHCT125 - Quad Level-Shifter][6]
* [470 ohm resistor][7]
* [Big Freaking Capacitor - 4700uF][8]
* [NeoPixel stick][9]You will need to edit the sketch to set the number of pixels you have,
and your WiFi SSID and password.Once the sketch is running, you'll need to figure out which IP address
it has been assigned. Generally, your router's web interface will
have a way to look at DHCP leases, and you can find it from there.It may also be useful to call [WiFi.hostname()][13] to assign a
hostname to your ESP board. This may show up as `hostname.lan` in
your DNS, although it [depends on your router][14].Once you know the IP address or hostname, you can connect with any
Open Pixel Control client. The [openpixelcontrol repository][10] has
some [clients in Python][11], and I have [a client in Haskell][12].## Caveats
This example is a nice proof-of-concept, but there are a couple of
reasons it isn't a robust solution.First, interrupts are disabled while writing to NeoPixels. Interrupts
are necessary for WiFi to work, so the server may eventually crash and
need to be rebooted, especially if you have a lot of NeoPixels. (This
problem could be alleviated by using [DotStars][15] instead of
NeoPixels, because DotStars are not timing-sensitive and do not need
to disable interrupts.)Second, Open Pixel Control runs over TCP, and
[TCP is not the best for real-time applications][16]. If a packet is
lost, TCP will retransmit it, delaying the packets after it.
[UDP][17] would be more suitable for this application.[1]: https://www.arduino.cc/
[2]: http://openpixelcontrol.org/
[3]: https://www.adafruit.com/category/168
[4]: https://www.adafruit.com/products/2821
[5]: https://github.com/esp8266/Arduino
[6]: https://www.adafruit.com/products/1787
[7]: https://www.adafruit.com/products/2781
[8]: https://www.adafruit.com/products/1589
[9]: https://www.adafruit.com/products/1426
[10]: https://github.com/zestyping/openpixelcontrol/
[11]: https://github.com/zestyping/openpixelcontrol/tree/master/python
[12]: https://github.com/ppelleti/hs-opc-client
[13]: https://arduino-esp8266.readthedocs.io/en/latest/esp8266wifi/station-class.html#hostname
[14]: https://unix.stackexchange.com/questions/92441/whats-the-difference-between-local-home-and-lan
[15]: https://www.adafruit.com/category/885
[16]: https://en.wikipedia.org/wiki/Transmission_Control_Protocol#Alternatives
[17]: https://en.wikipedia.org/wiki/User_Datagram_Protocol