Node.js client that converts JSON rgb objects to UART instructions and send them to arduino. Designed to run on Beaglebone Black or Raspberry pi
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
src Use JSON rgb object instead of deprecated halo string format Oct 27, 2014
test Setup test suite Sep 26, 2014
.travis.yml Travis uses 0.10.32 now Oct 27, 2014
LICENSE Rename to client! Aug 6, 2015 Update to 1.0 Aug 16, 2014


A 1.2 client that connects to a colorpicker-server server.

Its main purpose is to convert an array of JSON RGB objects like [{ r: 100, g: 50, b: 0 }, { r: 100, g: 50, b: 0 } into a UART instruction like '345,5,1,100,50,0;2,100,50,0,3,000,000,000,4,000,000,000,5,000,000,000;', and pipe it over UART to /dev/ttyO1.

Getting Started

You'll need a colorpicker-server instance running before this client is useful. You can deploy this server to a free host like Heroku or Nodejitsu, or test locally.

# set up the GUI and server
git clone
cd colorpicker-server
npm install -d
npm start

# set up the client
git clone
cd colorpicker-client
npm install
npm start

You should see a connected to socket at message.

Browse to http://localhost:1337 to use the GUI.

Configuring a Beaglebone Black with Angstrom Distro

You'll need to do three things:

  1. upgrade Node.js
  2. configure systemctl to set up reliable network connectivity at boot
  3. configure systemctl to start colorpicker-beaglebone Node service at boot

1. Upgrade Node.js

I refer you to the wonderful instructions at I recommend the current stable version of node, currently 0.10.32. You'll need at LEAST 0.10.0.

2. Network Connectivity

My findings have been that connman is very unreliable, so I fell back to using /etc/network/interfaces. To disable connman:

systemctl disable connman.service

# double check
systemctl status connman.service

Edit /etc/network/interfaces with your editor of choice. For ethernet/hardwired internet connectivity the only logic you need here is the loopback and the eth0 configuration, but there's also some example wifi, USB, and bluetooth configs here:

# /etc/network/interfaces
# configuration file for ifup(8), ifdown(8)

# The loopback interface
auto lo
iface lo inet loopback

# Wireless interfaces
 iface wlan0 inet dhcp
	wireless_mode managed
	wireless_essid any
	wpa-driver wext
	wpa-conf /etc/wpa_supplicant.conf

 iface atml0 inet dhcp

# Wired or wireless interfaces
auto eth0
iface eth0 inet dhcp

# Ethernet/RNDIS gadget (g_ether)
# ... or on host side, usbnet and random hwaddr
iface usb0 inet static

# Bluetooth networking
iface bnep0 inet dhcp

If you want additional help setting up WiFi, this article is handy.

After setting up your interfaces, configure a systemctl service to start ethernet connectivity at boot, touch a new file located at /etc/systemd/system/net.service:

# /etc/systemd/system/net.service
Description=Network interfaces

ExecStart=/bin/sh -c "sleep 5; ifup eth0"
ExecStop=/bin/sh -c "ifdown eth0"


Then enable the service!

systemctl enable net.service

# double check
systemctl start net.service
systemctl status net.service

You can check your connectivity using ifconfig.

3. Starting colorpicker-beaglebone at boot

To start this Beaglebone colorpicker client at boot, you can follow a similar approach to the network connectivity service. I have provided an example in the /angstrom directory of this repository.

First, touch a new file at /lib/systemd/system/colorpickerbeaglebone.service (ensure your paths are correct, these are an example):

# /lib/systemd/system/colorpickerbeaglebone.service
Description=colorpicker-beaglebone automatic start



You can copy the contents of /angstrom/ from this repo if you intend to use UART + Arduino to power the LEDs.

Then enable the service!

systemctl enable colorpickerbeaglebone.service

# double check
systemctl start colorpickerbeaglebone.service
systemctl status colorpickerbeaglebone.service