Minimalist Controller

I'm proceeding down the path of attempting limited compatibility with Vixen3. My limits right now are 250 pixels and 32 simultaneously active effect-timers. There is apparently room for a lot more simultaneous effect-timers than 32 if I'm to believe the Arduino IDE report on 'Executable segment sizes', although I don't totally trust that report (I have a const array that is larger than the amount of program flash, and it's not complaining).

One big question, though, is about how well the new/malloc and delete/free mechanisms work in a somewhat RAM-limited controller. I'm concerned about free memory becoming so fragmented after the controller has been running for a while that new/malloc don't work even when there is a lot of free memory.
 
With 32 active timers that I'd assume are running in the ISR, will that adversely impact the ESP's Wi-Fi connection?
 
With 32 active timers that I'd assume are running in the ISR, will that adversely impact the ESP's Wi-Fi connection?

They're pure software timers for beginning and ending effects (e.g. set a 24-pixel star to red starting at 1.025 seconds after the sequence starts playing and ending 0.5 seconds later).
 
OK, time to start testing. I've implemented SetLevel, Alternate, Chase effects in the controller, and I intend to add twinkle and pulse effects (or at least a subset of the pulse effects) after debugging/testing the other effects. I've not added Vixen3 support, that will be later on (for the moment I have a simple xml parser that can decode some text-edited quasi-XML sequence files).
 
Yes and No.

For now I just want simple sequences for testing the controller firmware without any attempt to synchronize to audio. To create those test sequences I'll use my text-editor of choice (emacs) to generate files similar to this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<Sequence>
<Groups>
  <Group size="36" loc="0">Snowflake-1</Group>
  <Group size="6" loc="0">Snowflake-1-Arm-1</Group>
  <Group size="6" loc="6">Snowflake-1-Arm-2</Group>
  <Group size="6" loc="12">Snowflake-1-Arm-3</Group>
  <Group size="6" loc="18">Snowflake-1-Arm-4</Group>
  <Group size="6" loc="24">Snowflake-1-Arm-5</Group>
  <Group size="6" loc="30">Snowflake-1-Arm-6</Group>

  <Group size="36" loc="0">Snowflake-2</Group>
  <Group size="6" loc="36">Snowflake-2-Arm-1</Group>
  <Group size="6" loc="42">Snowflake-2-Arm-2</Group>
  <Group size="6" loc="48">Snowflake-2-Arm-3</Group>
  <Group size="6" loc="54">Snowflake-2-Arm-4</Group>
  <Group size="6" loc="60">Snowflake-2-Arm-5</Group>
  <Group size="6" loc="66">Snowflake-2-Arm-6</Group>

  <Group size="6" loc="0" stride = "6">Snowflake-1-Ring-1</Group>
  <Group size="6" loc="1" stride = "6">Snowflake-1-Ring-2</Group>
  <Group size="6" loc="2" stride = "6">Snowflake-1-Ring-3</Group>
  <Group size="6" loc="3" stride = "6">Snowflake-1-Ring-4</Group>
  <Group size="6" loc="4" stride = "6">Snowflake-1-Ring-5</Group>
  <Group size="6" loc="5" stride = "6">Snowflake-1-Ring-6</Group>

  <Group size="100" loc="0">Fence-Left</Group>  
</Groups>
<Timers>
  <Timer start="0" span="40" effect="Set-Level" group="Snowflake-1" r="255" g="0" b="0"></Timer>  
  <Timer start="41" span="40" effect="Set-Level" group="Snowflake-1" r="0" g="255" b="0"></Timer>  
</Timers>
</Sequence>
and use an XML parser left over from a prior project to generate the data for use in the controller. Later on I'll modify that XML parser to accept the Vixen3 data files as input (although I don't think that I'll be thrilled using Vixen3 because of the clunky OS that it runs on).

Note: in that file the group values are in units of pixels, and the timer values are in units of 25ms (and I just noticed that the Fence-Left group overlaps the snowflake groups ... oops). In any case, it's a work in progress.
 
I'm back to playing around with this, and am making progress. However, I'm a bit annoyed by the Arduino implementations. First, it takes a quite long time to perform OTA updates with the ESP8266-01 device, and secondly something in the ESP firmware is playing around with GPIO2 (even when the built-in LED is set to GPIO1), which leads to some quite annoying visual effects when the ESP is powering up or being reprogrammed OTA. I'm thinking of going back to the earlier nRF24L01+PIC approach, although that has it's own difficulties.
 
Back
Top