Miscellaneous - Neopixel Blaster

How To Add This Control To Your Project

Step #1) Load the most recent release of EZ-Builder
Step #2) Press the Project tab from the top menu bar of EZ-Builder
Step #3) Press Add Control from the button ribbon bar of EZ-Builder
Step #4) Choose the Miscellaneous category tab
Step #5) Press the Neopixel Blaster icon to add the control to your project


Description

The Neopixel Blaster is a compact ezbit which controls up to 640 neo pixels on 8 different output ports and available in the EZ-Robot store. The compact footprint is designed to fit snug in a female ez-clip. Using this controller means you can have 80 neo pixels per output port (8 * 80 = 640 neopixels). Once this control is added to your project, select the digital port that the controller is connected to. Use the available ControlCommand() from the EZ-Script Cheat Sheet to set colors to the neo pixels.

There are 8 output ports on the EZ-Robot Neo Pixel Controller. Each of the ports can address 80 neo pixels.

Port 0

The first output port of the controller (port 0) has an onboard RGB led. This means that any neo pixels connected to port 0 must take in 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

Related Products


NeoPixel Blaster

Compact ezbit which controls up to 640 neo pixels on 8 different output ports.

Related Articles: N/A