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!

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

Lightweight Sliding Door Automator
Intermediate
  • 1,535
  • 7

Work in progress

Automate the opening and closing of a lightweight sliding door (e.g. a screen door), including remote controls on your phone.

Christmas Gift Box
Intermediate
  • 3,633
  • 595

Full instructions

Christmas Gift Box plays music and sends an email when it is opened.

Carbon Fiber Vacuum Chamber
Intermediate
  • 2,905
  • 94

Full instructions

Our project is a carbon fiber vacuum chamber that is monitored by multiple particle photons and various sensors.

ConnectTheDots with Particle Azure IoT Hub Integration
Intermediate
  • 841
  • 8

Protip

This project will allow you to connect your Particle device into an Azure IoT Hub for viewing data in real-time through an ASP.NET web app!

What should I wear outside?
Intermediate
  • 5,044
  • 67

Full instructions

A whimsical weather clock powered by Particle and forecast.io

Garage Door Opener with Blynk
Intermediate
  • 367
  • 2

Open, close and monitor a garage door opener with a smart phone using a Particle Photon and the Blynk application.

Add projectSign up / Login