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

What's My I2C Address?
Easy
  • 69
  • 3

The story of how to make a clock through using a LCD 1602 or LCD 2004 over I2C.

MyHumidity Controlled by BME280 and Photon
Easy
  • 181
  • 4

Full instructions

Checks if humidity threshold is reached and informs the user by using Blynk/IFTTT-services with softAP integration.

Tweeting Particle Photon
Easy
  • 42
  • 1

Full instructions

Tweet your friends with only the press of a button!

MyLight-Clock with NeoPixel Ring 12 Controlled by Photon
Easy
  • 260
  • 2

Full instructions

Read the time at night? Without glasses? Impossible? Focus on 2 light points, which will tell you the hour and the minute.

Map Your Particles!
Easy
  • 1,354
  • 20

Protip

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

BME280 measures and displays on OLED controlled by Photon
Easy
  • 340
  • 2

Protip

I share my first steps with the sensor BME280 (temp / humi / pressure / altitude) and an OLED 128 * 64 px

Add projectSign up / Login