Things used in this project

Hardware components:
Photon new
Particle Photon
You'll need a Particle connected to your free Particle.io account.
×1
Amazon echo dot
Amazon Alexa Echo Dot
You can use an Amazon Echo, Tap, Dot, or the echosim.io Alexa simulator.
×1

Code

Photon starter sketch source codeC/C++
Copy this code to Particle.io web IDE and flash it to your device.
/******************************************************************
Example starting point sketch for Patriot library
This example uses the built-in blue LED only.
It is provided as a quick start for your own sketches.
http://www.github.com/rlisle/Patriot
Written by Ron Lisle
BSD license, check LICENSE for more information.
All text above must be included in any redistribution.
Changelog:
2017-03-28: Use fixed 'patriot' event name.
2017-03-24: Initial creation
******************************************************************/

#include <IoT.h>
IoT *iot;

void setup() {
    iot = IoT::getInstance();
    iot->setControllerName("myPhoton");
    iot->begin();

    iot->addLight(D7, "Led"); // This is the small blue LED on a photon

    // Alexa will respond to "Alexa, turn on photon" or "Alexa, turn off photon"
    // You can change the word 'photon' to whatever you like, but it needs to be something
    // that Alexa can recognize. For now, use a single word.
    iot->addBehavior("Led", new Behavior("photon",'>',0, 100));
}

void loop() {
    iot->loop();
}

Credits

379434 2505719874906 2113020799 n
Ron Lisle

Lives in an RV, and is turning it into an IoT showcase using Alexa, iOS, and particle.io. Professional iOS and Alexa developer.

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

2-Way Particle Photon Communication
Easy
  • 132
  • 4

Make two Particle Photons "talk" via the usage of webhooks!

E-Paper Weather Display with Photon and IFTTT
Easy
  • 749
  • 9

Full instructions

Create a beautiful medium for weather information using Particle's cloud services and IFTTT.

IFTTT - Enabled Sensors with Particle Photon
Easy
  • 660
  • 11

Full instructions

Connect any sensor to Particle Photon and use it to trigger an IFTTT action with just a few lines of code.

Light Detecting Email Sender
Easy
  • 208
  • 4

Full instructions

Receive an email about when the light is too strong on your device; nobody wants a heated device left directly under the sun. Photon + IFTTT

Internet-Connected Popcorn Popper
Easy
  • 141
  • 1

Full instructions

A hot air popcorn popper triggered via the Internet! (Built for the Bellingham Codes May event.)

MyReed-Switch controlled by Particle Electron
Easy
  • 38
  • 0

Full instructions

Magnetism in a simple door monitoring

Add projectSign up / Login