Remora is a simple pseudo animation language that works as a companion to Orca receiving UDP short instructions and sending animations to addressable LED stripes. This animations run entirely in the ESP32 controller and are initially aimed to be short so they can be triggered by Orca sequencer bangs In feature/ring branch we will use a M5StickC to power the LED stripe please note the plataformio.ini settings for this board.
UDP will be hearing in a configurable port so you can send short instructions from Orca or any other program you desire.
- Get an ESP32 Board (Any) and compile this firmware using Plataformio or Arduino
- Make sure to update the settings for your LED Stripe (data PIN, Length) and also edit lib/Config/config.h adding your WiFi credentials
- Update the default Orca IP for UDP so it knows where to send the UDP Messages. Now Remora supports mDns so if you are on Linux or Mac try to make a ping to:
ping led.local
And see if the ESP32 responds to mark it's IP Address. That's how you can hit an animation from any device connected to the same network, sending an UDP message to that IP:49161. Note that for windows you need to install Bonjour to resolve local mDNS to their IP Addresses. If mDns discovery it's not an option, then connect the ESP32 board to the PC and open Serial debbugging in port 115200 on Arduino or Plataformio. Reset the board and you can see the IP Address as soon it connects to WiFi.
If you use the UDP redirector described in this section Orca can still send UDP messages to localhost and can be redirected by this background Nodejs script, enabling also the possibility to send to multiple devices from a single point. If you want to use only one, then you can just update the IP to your controller IP using the ip: command from ORCΛ
Check further details on how this works on this blog post at fasani.de
- ESP32 Board (The cheapest one. Suggested 4,50€)
- Addressable LEDs WS2812B (1 Mtr, 144 leds, about 10€)
- 1 mtr Aluminium profile (About 4€ in any store like Bauhaus)
- Additionally and if you use a Stripe larger as 72 elements then you will get a brown out error when many LEDs are on since USB delivers max. 500mA so we recommend to give power from an external source than USB: SANMIN 1PCS AC110V/220V-DC5V 3A 15W Isolated switch power supply module 220 to 5v
- Optional: 3D model to print the case In the project hackaday page you can file STL files for a simple case that fits a mini ESP32
That and soldiering 3 cables plus additing an optional 220v to 5VDC converter will do it. Usually the data cable is on the middle, so soldiering 5V positive, ground and data to a PIN in the ESP32 is the only electronic schema that you will need to make it work. Note: Links are not affiliate links and are given just as a reference, check in others stores if you get a better price, I calculate in total should be not more than 19 € to put a one meter Stripe + Controller together.
[0-35 HSL Color angle] is optional and multiplied per 10 to give Hue angle. If it's not sent as default will play last color. Please check the base 36 table to understand how to go beyond 9 for duration and hue values. Default initial color is red.
1[ms*100][0-35 A Hue][0-35 B] Launch animation left with color A to B ex. 190O will take 900ms with one corner in red to blue
3[ms*100][0-35 A Hue][0-35 B] Launch animation right with color B to A ex. 350O will take 500ms with one corner in red to blue
4[ms*100][0-35 Hue] Launch animation left ex. 490 will take 900ms with red 4990 900ms with green (Hue 90°)
5[ms*100][0-35 Hue] Launch 2 chaser animations left to right and right to left
6[ms duration *100][0-35 HSL Color angle] Launch animation right ex. 610 will take 100ms with color red 69O 900ms with color blue (Hue 240° since O is 240) 69C same but with color 120° green
7[ms*100][0-35 Hue] Makes noise (random on/off) all along the stripe
8[ms*100][0-35 Hue] Turn all to desired Hue color and fade to black dissapearing on the center
9[ms*50] Short white flash
0[ms*100][Note:AG or ag][0-35 Hue] Divides the Lenght of the stripe in 7 and simulates the note being played. Ex. 02A0 will play an A note for 200 ms in red color (Hue 0)
x[coordinate] Light only one Led to last color and leave it on. Ex. ;x1 will light the first led on the stripe
X[coordinate] Light only one Led and fade in 100ms to black
To open a detailed list of Orca examples please check docs/Remora-commands.orca or check the preview and video in Patchstorage
Switch colors without doing any animation
Experimental and not thoughfully tested. Useful if you want to keep different animations running but trigger the colors universally.
r Switch color to red
b Switch color to green
g Switch color to blue
v Switch color to violet
y Switch color to yellow
w Switch color to white
In this branch we will emulate Orca's 36 increments. Operators using numeric values will typically also operate on letters and convert them into values as per the following table. This will be used for the color angle of Hue. For example N will represent 24*10=240 (blue)
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
C | D | E | F | G | H | I | J | K | L | M | N |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
O | P | Q | R | S | T | U | V | W | X | Y | Z |
24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 |
Change directory to extras. Run:
nodejs udproxy.js
Configure your Id and IP combinations in ip-config.json
{
"1" : "192.168.0.2",
"2" : "192.168.0.3"
}
From Orca: Prepend your animations using this one character to lookup the IP Ex. ;152 Will lookup IP with id 1 and redirect the rest of the message (52) to 192.168.0.2 This will enable to run multiple ID stripes using a single IP address as a central point.
Testing this firmware after upload
- Orca, ORCΛ Sequencer
- UDProxy UDP is a simple nodejs script to enable sending animations to multiple Led stripes.
See comments at the start of js file for configuration
If you find a bug please make a git issue explaining how to reproduce it. For any other support please send mention me in twitter and I will add you as a contact so you can send me a private message.
Please feel free to fork this and make it yous adding new animation ideas. Pull requests are welcome!