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

Map Your Particles!
Easy
  • 609
  • 16

Protip

Locate your Particle Photons, P1s and Electrons on a map without needing extra hardware. Use Ubidots or an offline map alternative

Sending Photos and Video Over the Internet!
Easy
  • 2,012
  • 28

Full instructions

Record video, perform object and face recognition, take a time-lapse or whatever else with a Particle Photon and the 5-megapixel Arducam!

AssistantPi
Easy
  • 4,251
  • 35

Full instructions

Bring both Google Assistant and Alexa to your Raspberry Pi.

Using Alexa Speechcons in a Skill
Easy
  • 166
  • 2

Protip

Trying to give your Alexa skill a little more character? Use Speechcons in a skill to hack the Alexa voice to show a little emotion.

Text Machine, Get Gumball
Easy
  • 61
  • 1

This project describes how to build an Arduino-based, text-controlled gum dispenser

Power Supply Module 3.3V and 5V
Easy
  • 155
  • 0

Protip

First test of a separate Power Supply Module 3.3V and 5V

ProjectsCommunitiesTopicsContestsLiveAppsBetaFree StoreBlogAdd projectSign up / Login
Feedback