Introduction: Your Baby Is Under Control With Linino

Picture of Your Baby Is Under Control With Linino

We imagined a system for controlling the sleep of an infant, through the use of a number of sensors that now describe.

A flex sensor place in the cradle, monitors the movements and an sound sensor measures the intensity of the cries. Everything is kept under control from a web page which will alert us with a sound or video messages.

Step 1: What to Use:

Picture of What to Use:

Step 2: Coding

Picture of Coding

Javascript file only used to create the server, all the various functions to interface with the sensors are HTML side.

Install the module node-static to create the server.

Javascript file:

var linino = require('ideino-linino-lib'),
    board = new linino.Board(),
    html = new linino.Htmlboard();
var static = require('node-static');
var file = new static.Server('./');
 
board.connect(function() {
 
    require('http').createServer(function(request, response) {
        request.addListener('end', function() {
 
            file.serve(request, response);
        }).resume();
    }).listen(1337);
 
});

HTML file: http://pastebin.com/JTdebvqY

NB. You should substitute the IP address in the example with that of your board.

Step 3: Fritzing Sketch

Picture of Fritzing Sketch

Connect the Flex Sensor to pin A0 and the Sound Sensor to pin A1.

Step 4: Conclusions

Picture of Conclusions

Now, through a Web page, you can keep an eye on the situation. The bars are colored red, exceeded a certain value and an alarm will be started.

Run app.js, connected to the address of your board (eg http://10.0.0.13:1337/) and click on Start.

Your Baby is under control!

Step 5: About Linino

Picture of About Linino

Comments

You should enter this in the tech contest and the microcontroller contest! https://www.instructables.com/contest/tech2014/

https://www.instructables.com/contest/micro2014/

seamster (author)2014-10-20

Interesting. Thanks for sharing this.

About This Instructable

794views

12favorites

License:

More by Djando:Chameleon LampYour Baby is under control with Linino
Add instructable to: