obniz Parts Library

SEN0114

GitHub
SEN0114
Usable Devices :
obniz_board
Found at :
秋月電子通商

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);

Supported from: obniz.js 3.5.0