Moisture: Add C Src and Example

Changed from GroveMoisture.

Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
This commit is contained in:
Abhishek Malik
2016-09-12 15:25:45 -07:00
committed by Noel Eck
parent 0f7bb5573c
commit 1caf805d2b
19 changed files with 112 additions and 85 deletions

View File

@ -23,10 +23,10 @@
*/
//Load Grove Moisture module
var grove_moisture = require('jsupm_grovemoisture');
var moisture = require('jsupm_moisture');
// Instantiate a Grove Moisture sensor on analog pin A0
var myMoistureObj = new grove_moisture.GroveMoisture(0);
var myMoistureObj = new moisture.Moisture(0);
// Values (approximate):
// 0-300, sensor in air or dry soil