Animated LED Rainbow on WS2812/NeoPixel 1m Strip

{% trans 'Sorry, your browser does not support canvas -- please either update your browser or submit your requirements by phone or email.' %}


Avatar for Dorian Wiskow Dorian Wiskow

You can purchase a string of WS2812 LEDs or NeoPixel sticks or rings . . . and attach them to your CodeBug using the 'Extension Connector' or 'Tail' on the end of it . . . you will need to connect the WS2812/NeoPixel data line to the 'CS' pin on the ‘Tail’ and then set up the CodeBug to use the ‘ColourStar (as Tail)’. The Codebug itself can operate at between 2.3v and 5.5v, which means it can be powered by a 3v lithium battery (on the back) or with 5v from a USB cable . . . however it can only provide 125mA maximum VCC output with 25mA maximum sourced from any individual pin . . . so there are issues that need to be considered when powering things from the CodeBug itself ! WS2812 /NeoPixel LEDs require 5v (and will operate at lower voltages with reduced brightness), but you need to be careful about powering LEDs directly from the CodeBug . . . each WS2812/NeoPixel LED can require up to 60mA (when running with Red, Green and Blue at full brightness generating full intensity white light) so you can quickly exceed the CodeBugs ability to provide power. A more appropriate strategy is to power the LED strip with 5v (at up to 3.6A if using a 1M strip with 60 LEDs on it) and then use this supply to also power the CodeBug (using the additional VCC and GND connections on the ‘Tail’) I purchased a strip of 60 weatherproof LED from here and a suitable power supply from here The only additional item I needed was 6 way header pin strip ( to which I soldered the included cable to the VCC, GND and CS pins. Don't forget to set numLED, delayTime & brightness !

Report this project
Back to top