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 LEDS_PER_RING 48 // Fixed by hardware
#define LEDS_PER_BOARD 96 // Inner + Outer rings
#define TOTAL_PIXELS (NUM_BOARDS * LEDS_PER_BOARD)
#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 demo firmware supports effect switching via Serial Monitor at 115200 baud:
| Key | Effect |
|---|---|
| 1 | Color Cycle |
| 2 | Pixel Walk |
| 3 | Radar Sweep |
| 4 | Dual Spin |
| 5 | Ripple Pulse |
| 6 | Theater Chase |
| 7 | Sparkle |
| 8 | Rainbow Wheel |
| 9 | Fire Ring |
| a | Comet |
| b | Breathing |
| c | Color Wipe |
| d | Wave |
| e | Cylon |
| f | Meteor Shower |
| g | Comet Crosser |
| h | Strobe |
| i | Confetti |
| j | Clock |
| 0 | All OFF |
Custom Effects
You can write custom effects using low-level LED access:
void myCustomEffect(unsigned long now) {
// Clear all LEDs
px.clear();
// Set individual LEDs
for (int i = 0; i < 48; i++) {
uint8_t hue = (i * 256 / 48 + now / 10) % 256;
px.setRingLed(0, 0, i, Wheel(hue)); // Inner ring
px.setRingLed(0, 1, i, Wheel(hue + 128)); // Outer ring
}
px.show();
}
See the API Reference for all available methods.
