Pooja Baraskar
Published © GPL3+

Smart Baby Monitor with Intel® Edison and Ubidots

Nowadays there are many wearables in the market for different purposes, so why not we make one for babies?

IntermediateFull instructions provided4,803
Smart Baby Monitor with Intel® Edison and Ubidots

Things used in this project

Story

Read more

Code

Code

C/C++
function readSoundSensorValue() {

    var buffer = new upmMicrophone.uint16Array(128);

    var len = myMic.getSampledWindow(2, 128, buffer);

    if (len)

    {

        var thresh = myMic.findThreshold(threshContext, 30, buffer, len);

        myMic.printGraph(threshContext);

        if (thresh)

            console.log("Threshold is " + thresh);

        v.saveValue(thresh);

        if(thresh>50 && thresh<150)

         showNormalLCD();

        if(thresh>=150)

        showLCD();

        if(thresh<50)

        showSleepLCD();
    }
}
setInterval(readSoundSensorValue, 1000);

Code

C/C++
var temp = new groveSensor.GroveTemp(1);

console.log(temp.name());

var i = 0;

var waiting = setInterval(function() {

        var celsius = temp.value();

        var fahrenheit = celsius * 9.0/5.0 + 32.0;

        console.log(celsius + " degrees Celsius, or " +

            Math.round(fahrenheit) + " degrees Fahrenheit");

        i++;

        if (i == 10) clearInterval(waiting);

        }, 1000);

Code

C/C++
var ubidots = require('ubidots');


var client = ubidots.createClient('YOUR-API-KEY');


client.auth(function () {

  this.getDatasources(function (err, data) {

    console.log(data.results);

  });

  var ds = this.getDatasource('xxxxxxxx');


  ds.getVariables(function (err, data) {

    console.log(data.results);

  });

  ds.getDetails(function (err, details) {

   console.log(details);

});


  var v = this.getVariable('xxxxxxx');


  v.getDetails(function (err, details) {

    console.log(details);

  });

  v.getValues(function (err, data) {

    console.log(data.results);

  });

Credits

Pooja Baraskar

Pooja Baraskar

25 projects • 178 followers
Pooja Baraskar is an accomplished software engineer, inventor, and technical author with over a decade of experience in the tech industry.

Comments