API Reference

Board Types

enum BoardType {
  BOARD_NEORING     // Dual 48-LED rings (96 LEDs per board)
};

Constants

#define RP_NEORING_LEDS_PER_RING   48
#define RP_NEORING_LEDS_PER_BOARD  96

Constructor

RobotechPixel(BoardType boardType, uint8_t numBoards, uint8_t pin)
ParameterDescription
boardTypeBOARD_NEORING
numBoardsNumber of daisy-chained boards
pinData output pin number

Lifecycle

void begin()           // Initialize the LED strip
void show()            // Push LED data to the strip
void clear()           // Set all LEDs to off (must call show() to apply)

Brightness

void setBrightness(uint8_t b)    // Set brightness (0–255)
uint8_t getBrightness() const    // Get current brightness

LED Access

By Global Index

void setLed(int globalIndex, uint32_t color)

Sets a single LED by its position in the entire chain (0 to getTotalPixels()-1).

By Ring Position (NeoRing)

// Full form: board, ring, LED index
void setRingLed(int pcbIndex, int ringIndex, int ledIndex, uint32_t color)

// Board 0 shorthand: ring, LED index
void setRingLed(int ringIndex, int ledIndex, uint32_t color)

// Board 0, ring 0 shorthand: LED index only
void setRingLed(int ledIndex, uint32_t color)
ParameterDescription
pcbIndexBoard number (0-based)
ringIndex0 = inner ring, 1 = outer ring
ledIndexPosition within the ring (0–47 for NeoRing)

Color Helper

static uint32_t color(uint8_t r, uint8_t g, uint8_t b)

Creates a packed 32-bit color value from RGB components.

Geometry Queries

BoardType getBoardType() const
uint8_t getNumBoards() const
int getTotalPixels() const
int getLedsPerRing() const    // 48 for NeoRing
int getLedsPerBoard() const   // 96 for NeoRing

Ring Mapping (NeoRing)

int innerPixel(int board, int idx) const   // Global index for inner ring LED
int outerPixel(int board, int idx) const   // Global index for outer ring LED
void setPathPixel(int board, int pathPos, uint32_t color)  // 0-95 as continuous path

Pixel Helpers

void fadeAll(uint8_t factor)              // Fade all LEDs by factor (0=instant, 255=no fade)
void fadePixel(int index, uint8_t factor) // Fade a single LED
uint32_t getPixelColor(int index) const   // Get current color of a LED