Firmware Guide

Default Configuration

The NeoRing ships with pre-loaded firmware. The key configuration values are:

#define PIN             7          // Data pin
#define NUM_BOARDS      1          // Number of daisy-chained boards
#define MAX_BRIGHTNESS  150        // 0-255, keep under 150 for USB

Using the RobotechPixel Library

The recommended approach is to use the RobotechPixel library:

#include <RobotechPixel.h>

#define DATA_PIN    7
#define NUM_BOARDS  1

RobotechPixel px(BOARD_NEORING, NUM_BOARDS, DATA_PIN);

void setup() {
  px.begin();
  px.setBrightness(150);
}

void loop() {
  fxRainbowWheel(px, millis());
  px.show();
}

Ring Addressing

The library provides helper functions for addressing LEDs by ring:

// Address inner ring LED (board 0, LED index 5)
px.setRingLed(0, 0, 5, px.color(255, 0, 0));  // Red

// Address outer ring LED (board 0, LED index 5)
px.setRingLed(0, 1, 5, px.color(0, 255, 0));  // Green

// Shorthand for single board
px.setRingLed(0, 5, px.color(0, 0, 255));  // Inner ring, blue
px.setRingLed(5, px.color(255, 255, 0));    // Inner ring, yellow

Serial Monitor Control

The LibraryEffectsDemo (File → Examples → RobotechPixel → LibraryEffectsDemo) supports effect switching via Serial Monitor at 115200 baud. The default mode is Auto Cycle, which rotates through all effects.

KeyEffectKeyEffect
aAuto Cycle (default)oColor Cycle
bPixel WalkpRainbow Wheel
cRadar SweepqWave
dDual SpinrRipple Pulse
eCometssColor Wipe
fComet CrossertBreathing
gOrbituHeartbeat
hMeteor ShowervFire Ring
iCylonwStarfield
jTheater ChasexStrobe
kSparkleyPolice
lConfettizClock
mSparks1Full White
nTwinkle0All OFF

Send B<0-255> to set brightness (e.g. B255).

Custom Effects

You can write custom effects using low-level LED access:

void myCustomEffect(unsigned long now) {
  px.clear();

  for (int b = 0; b < px.getNumBoards(); b++) {
    if (!px.boardHasRings(b)) continue;
    uint8_t lpr = px.getLedsPerRing(b);

    for (int i = 0; i < lpr; i++) {
      uint8_t hue = (i * 256 / lpr + now / 10) % 256;
      px.setRingLed(b, 0, i, rpWheel(hue));          // Inner ring
      px.setRingLed(b, 1, i, rpWheel(hue + 128));    // Outer ring
    }
  }

  px.show();
}

This pattern works across all board types and ring sizes — effects automatically adapt to each board's geometry.

See the API Reference for all available methods.