Thumbnail

Neopixel Blaster

How to add the Neopixel Blaster robot skill

  1. Load the most recent release of ARC (Get ARC).
  2. Press the Project tab from the top menu bar in ARC.
  3. Press Add Robot Skill from the button ribbon bar in ARC.
  4. Choose the Misc category tab.
  5. Press the Neopixel Blaster icon to add the robot skill to your project.

Don't have a robot yet?

Follow the Getting Started Guide to build a robot and use the Neopixel Blaster robot skill.


How to use the Neopixel Blaster robot skill

The Neopixel Blaster is a compact DIY controller designed by Synthiam (the design files are listed below). It controls up to 640 Neo pixels on 8 different output ports. Using this controller allows your robot to have 80 Neo pixels per output port (8 * 80 = 640 Neo pixels). Once this control is added to your project, select the digital port to which the controller is connected. Use the available ControlCommand() from the Cheat Sheet to set colors to the Neo pixels.

Neo pixels use microsecond timing for their communication protocol. Because of the high-speed performance and timing accuracy required, a dedicated microcontroller is needed to control Neo pixels.

The Neo Pixel Blaster controller has eight output ports, each addressing 80 Neo pixels.

Hardware

*Note: This product is not purchasable, and you have to make it yourself from the design files. Get the NeoPixel Blaster design files in the Hardware Reference Designs here: Roll Out - Neo Pixel Blaster

The hardware for the Neopixel Blaster is available for download here: HERE on GitHub.

Port 0

The controller's first output port (port 0) has an onboard RGB LED. This means that any Neo pixels connected to port 0 must count that the first LED on the address bus is the onboard controller. All other ports use the first Neo pixel as the first device address on the bus.

Example #1

This example sets LED on the NeoPixel Controller to the color purple.

ControlCommand("NeoPixel", DefineSize, 0, 1)

ControlCommand("NeoPixel", SetAll, 0, 255, 0, 255)

ControlCommand("NeoPixel", Update, 0)

Example #2

This example assumes there are 3 NeoPixels (including the onboard NeoPixel) connected to port 0. It will change each LED to a different color.
ControlCommand("NeoPixel", DefineSize, 0, 3)

ControlCommand("NeoPixel", Set, 0, 0, 0, 0, 255) # blue onboard LED

ControlCommand("NeoPixel", Set, 0, 1, 0, 255, 0) # green second LED

ControlCommand("NeoPixel", Set, 0, 2, 255, 0, 0) # red third LED

ControlCommand("NeoPixel", Update, 0)

Example #3

This example will scroll through the colors in 3 phases with a 100ms delay. It uses the port 1 on the NeoPixel Controller.
ControlCommand("NeoPixel", DefineSize, 1, 64)

$offset = 0

:loop

repeat ($x, 0, 63, 1)
  ControlCommand("NeoPixel", Set, 1, ($x + $offset) % 64, (64 - $x) % 12, $x / 2, $x % 38)
endrepeat

ControlCommand("NeoPixel", Update, 1)

sleep(100)

$offset++

goto(loop)

Example #4

The Matrix
ControlCommand("NeoPixel", DefineSize, 1, 64)

$offset = 0

:loop

repeat ($x, 0, 63, 1)
  ControlCommand("NeoPixel", Set, 1, ($x + $offset) % 64, 0, 0, (64 - $x) % 20)
endrepeat

ControlCommand("NeoPixel", Update, 1)

sleep(10)

$offset++

goto(loop)

Example #5

The Sparkle Matrix
ControlCommand("NeoPixel", DefineSize, 1, 64)

$offset = 0

:loop

repeat ($x, 0, 63, 1)
  ControlCommand("NeoPixel", Set, 1, ($x + $offset) % 64, 0, 0, (64 - $x) % 20)
#  ControlCommand("NeoPixel", Set, 1, ($x + $offset) % 64, (64 - $x) % 12, $x / 2, $x % 38)
endrepeat

  $i = getrandom(0, 63)  
  $r = getrandom(0, 53)
  $g = getrandom(0, 53)
  $b = getrandom(0, 53)
  
  ControlCommand("NeoPixel", Set, 1, $i, $r, $g, $b)

ControlCommand("NeoPixel", Update, 1)

sleep(10)

$offset++

goto(loop)

Video


ARC Pro

Upgrade to ARC Pro

Subscribe to ARC Pro, and your robot will become a canvas for your imagination, limited only by your creativity.