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

Blynk GPS Tracker
Intermediate
  • 41
  • 2

Full instructions

Simple GPS tracker using a Particle Photon (or Electron) and an EM406 GPS module with location visible on Blynk app map.

Pool Buddy
Intermediate
  • 1,619
  • 11

Work in progress

Monitor and log water quality (pH & ORP) and temperature from everywhere.

IoT Thermometer Using Python
Intermediate
  • 986
  • 8

Full instructions

How to develop a simple but powerful IoT thermometer using a Zerynth-powered single-board MCU and the Zerynth App.

Particle Photon Flip Dot Clock
Intermediate
  • 2,162
  • 31

Full instructions

The flip dot display uses an electromechanical dot matrix that spin from black to yellow to display text, numbers and more!

Patriot iOS App
Intermediate
  • 547
  • 9

Use an old iPhone device to control and display the status of your Patriot IoT devices.

Patriot iOS App

Team Patriot

What To Wear LCD
Intermediate
  • 48
  • 1

Ever wondered what to wear due to unpredictable weather??? Wonder no longer!

Add projectSign up / Login