Geert Roumen
Published © CC BY

From Pixel to NeoPixel

Use the cursor to change the colour of NeoPixels. Create light experiences using visual software like Photoshop or After Effects.

AdvancedFull instructions provided6,195

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
Any Arduino compatible board would work
Adafruit NeoPixel Digital RGB LED Strip 144 LED, 1m White
Adafruit NeoPixel Digital RGB LED Strip 144 LED, 1m White
Any Neopixel ( or WS2812B or SK6812-based LEDs would work
USB-A to B Cable
USB-A to B Cable
Breadboard (generic)
Breadboard (generic)
Jumper wires (generic)
Jumper wires (generic)

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
This is needed when you get Neopixels without wires or pins pre-solderedn on them


Read more


Arduino with Single Neopixel

Arduino UNO with a single Neopixel connected to port 10

Arduino with Neopixel ring

Arduino with Neopixel ring 24 pixels, connected to pin 10. Make sure to update the NUMPIXELS in the Arduino code



This code sends the current color of the pixel that is 'selected' by the cursor over to the Arduino that can transfer it to neopixels or other hardware.
@Title Processing to Arduino RGB LED (Neopixels)
@Author Geert Roumen
@Institute Umeå Institute of Design
@Date 29-01-2018
IDE:  Processing 3.3.6
OS:   Windows 10.0.17134 Build 17134
import java.awt.*;
Robot robot;
import processing.serial.*;
Serial myPort;  
int val;       
//Setup the communication and Robot instance
void setup(){
  size(1000, 150);
  //Connect to the first Serial port of the PC
  String portName = Serial.list()[0];
  print("Serial ports: ");
  print("Chose ");
  //Try to open this port
  myPort = new Serial(this, portName, 9600);
  //If you want this window to always stay on top
  //Try to create a AWT Robot
    robot = new Robot();
  }catch (AWTException e){
    throw new RuntimeException("Unable to Initialize", e);
//Make a counter variable
int i=0;
void draw(){
  //Get the location of the pointer (mouse/cursor)
  Point mouse;
  mouse = MouseInfo.getPointerInfo().getLocation();
  //Get the color at the location of the pointer, pointer icon is ignored
  Color c = robot.getPixelColor(mouse.x,mouse.y);
  //Get the integer RGB value at this point
  int top = c.getRGB();
  //Write an S to the Serial port
  //Do some conversion to make it look white when all colors are 255
  //These values are based on neopixels.
  float r = (float) (red(top)*0.780);//(199/255));
  float g = (float) (green(top)*0.99);//;(254/255));
  float b = (float) (blue(top)*0.56);//(144/255));
  //Start writing the [RGB] as three bytes 
  myPort.write((byte) r); 
  myPort.write((byte) g); 
int j=0;
//if a key is pressed an image of the current 'flow' will be saved.
void keyPressed() {


This code is recieving RGB values from processing and passing it on to the neopixel LED strip.
@Title Processing to Arduino RGB LED (Neopixels)
@Author Geert Roumen
@Institute Umeå Institute of Design
@Date 29-01-2018
Arduino   RGB Neopixel
GND       GND
10        Input
5V/USB    Power
In this example sketch Processing can send an RGB value to Arduino and Arduino will change the LED color of the NUMPIXELS connected neopixels
#include <Adafruit_NeoPixel.h>
#define PIN            10
//The amount of pixels connected to the Arduino, make sure they are powered correctly
#define NUMPIXELS      24
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
  pixels.begin(); // This initializes the NeoPixel library.
void loop() {
  // For a set of NeoPixels the first NeoPixel is 0, second is 1, all the way up to the count of pixels minus one.
  int r;
  int g;
  int b;
  if(Serial.available()) {   
    if( == 'S') {
      //When it finds an 'S' char, it will wait untill it finds 3 other bytes
      r =;
      g =;
      b =;
    delay(10); // some recovery time, not sure if nessecary
    for(int i=0;i<NUMPIXELS;i++){
    // pixels.Color takes RGB values, from 0,0,0 up to 255,255,255
    pixels.setPixelColor(i, pixels.Color(r,g,b)); // Moderately bright green color.
  }; // This sends the updated pixel color to the hardware


Geert Roumen

Geert Roumen

6 projects • 7 followers
I’m a maker and interaction designer, bridging the digital and physical world. and make prototypes and do research in a playful way.