Things used in this project

Custom parts and enclosures

Find lights malfunctioning by address
Ask Alexa if lights in an address are working uses query as a skill
streetlightsquery_yEVxw3SYPX.txt

Schematics

query to find when lights stay on
User asks Alexa which uses the query as a skill
streetlightsquerylightsonafter730am_Cp9na5Q2hT.txt

Code

Code to read the light sensor and create recordC#
#include <unistd.h>
#include <iostream>
#include "grove.h"

int
main(int argc, char **argv)
{
//! [Interesting]
    // Create the light sensor object using AIO pin 0
    upm::GroveLight* light = new upm::GroveLight(0);

    // Read the input and print both the raw value and a rough lux value,
    // waiting one second between readings
    while( 1 ) {
        std::cout << light->name() << " raw value is " << light->raw_value() <<
            ", which is roughly " << light->value() << " lux" << std::endl;
        sleep(1);
    }

    // Delete the light sensor object
    delete light;
//! [Interesting]
    return 0;
}

Credits

A10a03271c5986725934eb661477bce6
Gregg Reynolds
1 project • 1 follower
I'm working with Iotivity in C, Java, and Clojure.
Contact
Mochamat z9myco2wm7
Mauricio Chamat
1 project • 0 followers
I enjoy solving problems by creating appropriate solutions and not developing a solution and waiting for a problem to solve.
Contact
15e3a9d293724425108c3b78b40c20e2
Prathyusha Ganti
1 project • 0 followers
Contact
B7237b82cbeab2769f376c711ed93280
Ravi Ayyagari
1 project • 0 followers
Contact
Thanks to Richard Passo.

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

Sign up / LoginProjectsPlatformsTopicsContestsLiveAppsBetaBlog