Re: How to add new programs to Octolively

Windell Oskay

We don’t advertise it, but there actually *are* 16 “built in” modes in the default firmware, rather than 8, and so there actually is already a built-in “GUI” (if we dare call it that) for selecting between 16 modes.   

The additional 8 modes are officially undocumented and unsupported, but they are available for you to either use, or to replace with custom programs.   These modes, (8-15) are called the “network modes” because they can share information over the edge connectors.  
To enable these modes, hold down the button for a long log time, to get to a selection menu that will let you pick between the network modes and the non-network modes. (IIRC, there’s a center square, to indicate local modes only, and a circulating pattern, to indicate network modes enabled.)  When enabled, there are 16 possible selections, rather than 8.  The second 8 are indicated by blinking LEDs instead of steady.

The response functions are given by the “ledhandler”:

ledHandler ledHandlers[] = {

  basic_fade,   // 0

  slow_fade,    // 1

  quick_fade,   // 2

  sine_fade,    // 3

  sparkle_fade, // 4

  heat_fade,    // 5

  inv_fade,     // 6

  flash_fade,   // 7

  // net + fade

  basic_fade,   //  8 — all boards

  slow_fade,    //  9 — all boards

  basic_fade,   // 10 — no decay

  basic_fade,   // 11 — decay

  basic_fade,   // 12 — no decay, larger radius

  sparkle_fade, // 13 — decay




Each “handler” is independent, and the LEDs act individually. If you look at how these are called (dispatched) you may be able to see how to make individual LEDs use different handlers. 

For a different approach, check out our Interactive Game of Life code, which does not have grayscale, but does have good networking.