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.

Mochamat z9myco2wm7
Mauricio Chamat

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

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

The composting friend
Intermediate
  • 633
  • 34

Full instructions

Our goal is to make composting easier to use and to maintain.

Smart Mirror (with Optional Alexa)
Intermediate
  • 18,676
  • 91

Full instructions

A low cost and easy to build smart mirror with off the shelf parts.

Travel Trainer
Intermediate
  • 79
  • 3

Work in progress

A mobile VR application that helps people with learning disabilities practice travelling by using an Intel Edison to gather behaviour data.

Travel Trainer

Team Independence VR

HVAC
Intermediate
  • 941
  • 42

Work in progress

Heating ventilation and air-conditioning for a dome.

SORT4U
Intermediate
  • 411
  • 14

Full instructions

It's the sorting machine that you've been waiting for. Just throw all your junk in it and let it sort for you.

SORT4U

Team The Avengers

cabiNET
Intermediate
  • 139
  • 3

Work in progress

Connected to your children's stomach!

ProjectsCommunitiesContestsLiveAppsBetaFree StoreBlogAdd projectSign up / Login
Respect project
Feedback