Things used in this project

Hardware components:
Core
Particle Spark Core
×1
Adafruit Neo Pixel - 4 pack - Breadboard friendly
×1
Adafruit 8 channel - Bi-directional Logic Level Converter
×1
LED Glow Orb
Buy this on amazon and gut the electronics. The translucent shell works really great!
×1
Software apps and online services:
Heroku
Firebase
Hand tools and fabrication machines:
09507 01
Soldering iron (generic)

Schematics

Picture of circuit
Img 3584

Code

Particle codeC/C++
Paste this code into the Particle IDE for your project
#include "neopixel/neopixel.h"

// IMPORTANT: Set pixel COUNT, PIN and TYPE
#define PIXEL_PIN D2
#define PIXEL_COUNT 4
#define PIXEL_TYPE WS2812B

Adafruit_NeoPixel strip = Adafruit_NeoPixel(PIXEL_COUNT, PIXEL_PIN, PIXEL_TYPE);

int r = 0;
int g = 0;
int b = 0;

void setup() 
{
  strip.begin();
  strip.show(); // Initialize all pixels to 'off'
}
void loop() 
{
   Spark.function("color", ledControl);
   if (r == 0 && b == 0 && g == 0) {
     rainbow(20);
   }
}

int ledControl(String command){
  int i;
  String rs = String(command.substring(0,3));
  String gs = String(command.substring(3,6));
  String bs = String(command.substring(6));
  r = (int)rs.toInt();
  g = (int)gs.toInt();
  b = (int)bs.toInt();
  for(i=0; i<strip.numPixels(); i++) {
    strip.setPixelColor(i, strip.Color(r,g,b));
  }
  strip.show();
  return 1;
}

void rainbow(uint8_t wait) {
  uint16_t i, j;

  for(j=0; j<256; j++) {
    for(i=0; i<strip.numPixels(); i++) {
      strip.setPixelColor(i, Wheel((i+j) & 255));
    }
    strip.show();
    delay(wait);
  }
}

// Input a value 0 to 255 to get a color value.
// The colours are a transition r - g - b - back to r.
uint32_t Wheel(byte WheelPos) {
  if(WheelPos < 85) {
   return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
  } else if(WheelPos < 170) {
   WheelPos -= 85;
   return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
  } else {
   WheelPos -= 170;
   return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
  }
}
Orby Hue App
This is the code you'll need to run on heroku (or other service) if you want a webUI to change the color of your orb

Credits

43358b1dc76c91f999cd7258873dbcb8
Brian Chamberlain

Software Engineer and Hardware Hacker

Contact

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Similar projects you might like

Raspberry Pi Motion Tracking Gun Turret
Intermediate
  • 828
  • 13

Full instructions

A motion tracking airsoft or Nerf gun turret with autonomous and manual operation modes, controlled by a Raspberry Pi.

Reducing Arduino Power Consumption
Intermediate
  • 144
  • 5

Full instructions

One the most important feature of portable electronics should be long battery life. We can reduce the current drawn by several ways.

Particle Photon Based Security System with Alerting
Intermediate
  • 1,345
  • 20

Full instructions

Be alerted to any door or window opening and closing in your house on your smart phone.

Happy Plant Notifier
Intermediate
  • 290
  • 5

Full instructions

Get a text or call if your plant is getting too dry, along with a nice LCD display giving information regarding your plant's health.

My Guardian for the Workshop
Intermediate
  • 202
  • 4

Full instructions

Device will send emails if the door or window has been opened, and will monitor the temperature and humidity of the place.

Audio DAC HAT for Pi with Headphone Jack and 3W Speaker Out
Intermediate
  • 627
  • 3

Full instructions

Make your own DAC HAT for Raspberry Pi 3, Raspberry Pi Zero, Raspberry Pi Zero W that has a headphone jack and 3W stereo speaker out.

Sign up / LoginProjectsPlatformsTopicsContestsLiveAppsBetaFree StoreBlog