Things used in this project

Hardware components:
Neopixel strip
NeoPixel strip
×1
Photon new
Particle Photon
get a headerless photon, you don't need the pins
×1
Adafruit industries ada260 image 90px
USB-A to Mini-USB Cable
×1
Software apps and online services:
Particle.io API
Hand tools and fabrication machines:
09507 01
Soldering iron (generic)

Schematics

Neopixel to Photon Schematic
Connect the wires
Fbl2bjk7ceiijhefigvf

Code

Web code to start a light showJavaScript
This is the code for your website that starts a light show by passing through a light show mode to your Photon. On a button click, pass through a 'mode' parameter, like 'blue', 'red', or 'rainbow'
import {Injectable} from '@angular/core';
import { Http, Response, Headers } from '@angular/http';
import {LogService} from '../../core/services/log.service';
import {Observable} from 'rxjs/Rx';
import 'rxjs/add/operator/map';


@Injectable()
export class PhotonService {
  private requestURl: string;
  private accessToken: string;

  constructor(
    private logger: LogService,
    private http: Http) {
      logger.debug(`Photon initializing...`);
      //device id
      this.requestURl = 'https://api.particle.io/v1/devices/<post your api key here>/startRave/';
      //access token
      this.accessToken = '<post your access token here>';
  }

public startLightShow(mode: string) {

  let params = 'command=' + mode + '&access_token=' + this.accessToken;

  let headers = new Headers();
  headers.append('Content-Type', 'application/x-www-form-urlencoded');

  this.http.post(this.requestURl, params, {headers: headers})
    .map(res => res.json())
    .subscribe(
      data => params,
      err => this.handleError(err),
      () => console.log('Post Complete')
    );
}

  private handleError(error: Response) {
      return Observable.throw(error);
  }


}

Credits

7a2730fc6fd826ace7f1ce9bcabee05b
Jen Looper

Founder: http://t.co/DOXReolRYV, indie web and mobile developer, Developer Relations team member at Telerik. Queen of the Apps!

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

Particle Photon Doorbell
Intermediate
  • 621
  • 9

Full instructions

Get notified when the doorbell is pressed for about 1/6 the price of the RING doorbell!

DIYSprinkler Controller
Intermediate
  • 422
  • 3

Full instructions

Make your own sprinkler controller and I have the software to control it. Must have an existing sprinkler system or you could make your own

DIYSprinkler Controller

Team dougefresh89

Magic Eyeball
Intermediate
  • 781
  • 7

Full instructions

It's like a magic eight ball. But with Alexa, and two eyeballs.

Spoil your Valentine with Particle + Spoil + AWS
Intermediate
  • 478
  • 3

Full instructions

Instead of giving a box of chocolates this Valentines Day, keep the chocolates. Lets give a smart self-gifting box instead!

Pebble + Photon = IoT Watch Switch
Intermediate
  • 50
  • 1

Full instructions

When I arrive in my house I switch on the light with my Pebble Watch! The procedure to make this is very simple.

Automated Cat Feeder with Particle Photon
Intermediate
  • 1,544
  • 19

Work in progress

The goal was to make it possible to feed my cats when I'm not at home.

Add projectSign up / Login
Respect project