Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
README-ja.md
README.md
SEN0114.fzz
image.jpg
index.d.ts
index.js
wired.png

README.md

Soil Moisture Sensor - SEN0114

It detect moisture level in soil.

wired(obniz, { vcc, output, gnd} )

connect vcc,output,gnd to an obniz Board.

// Javascript Example
var sensor = obniz.wired("SEN0114", {vcc:0,  gnd:1, output:2});
sensor.onchange = function(humidity){
  console.log(humidity)
};

onchange = function(value)

callback function called when the value was changed. Manufacture data says moisture level increse with moisture like

  1. 0~1.47: Dry
  2. 1.47~3.43: Wet
  3. 3.43~4.20: Under walter
// Javascript Example
var sensor = obniz.wired("SEN0114", {vcc:0,  gnd:1, output:2});
sensor.onchange = function(humidity){
  console.log(humidity)
};

[await] getHumidityWait()

Measure and get current value once.

// Javascript Example
var sensor = obniz.wired("SEN0114",  {vcc:0,  gnd:1, output:2});
var humid = await sensor.getHumidityWait();
console.log('Humidity Level:' + humid);
You can’t perform that action at this time.