DEV Community

obniz
obniz

Posted on

Human detect and time record lamp

Human detect and time record lamp

What's this

Home IoT Kit Example

This makes your room lamp smarter.
It turn on automatically when it detect human. And It also record the time at a file on Dropbox.

Materials

  • obniz
  • Power supply for obniz
  • PIR sensor (of IoT Home Kit)
  • Servo Motor (of IoT Home Kit)
  • Steps
  • First, Attach a servo motor to a switch on the wall.

The way you attach depends on your switch.

And connect a PIR sensor and a servo motor to an obniz. Then connect to a power.

Write and Run a program.
This example program has a manual method.
Turn a switch to the left, Your servo will move.
Tune the value on the example program to work correctly.

And Please specify dropbox API key. You can see how to on Lessons.

Let's test.

Your servo will move when you close to a sensor.
And you will see a file which contain the time on your dropbox.

This time I use HTML But nodejs will work more sufficiently. It works persistently.

Also you might want to turn off automatically or record more information to a file. It seems fun

Program

https://obniz.io/explore/33

Top comments (0)