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

I'm working with Iotivity in C, Java, and Clojure.

Contact
Mochamat z9myco2wm7
Mauricio Chamat

I enjoy solving problems by creating appropriate solutions and not developing a solution and waiting for a problem to solve.

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

Similar projects you might like

Stream Music Over Wi-Fi to Amazon Echo Through AirPlay
Intermediate
  • 577
  • 8

Protip

Turn an Amazon Echo into a multi-room speaker.

Computer Vision Neural Network on Your Intel NUC / Linux Box
Intermediate
  • 395
  • 5

Work in progress

Want to turn your Intel® NUC, or any Linux box running Ubuntu into an artificially intelligent, IoT connected CCTV hub? Check this out!

Eco-Thing #1  "Eco-Smart-Container V1.0"
Intermediate
  • 1,799
  • 13

Full instructions

An IoT device that could help keep the Sandy River Delta clean, as garbage is a very common problem.

Smart Garbage Monitoring System Using Arduino 101
Intermediate
  • 760
  • 5

Full instructions

A method in which waste management is automated. An innovative system that will help keep the city clean and healthy

Shower Regulator
Intermediate
  • 2,960
  • 3

Full instructions

Learn how to make a device to limit your shower time!

Christmas Gift Box
Intermediate
  • 3,679
  • 595

Full instructions

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

Sign up / LoginProjectsPlatformsTopicsContestsLiveAppsBetaFree StoreBlog