docs: Removed 'Grove' from Comments

Signed-off-by: Suyash Lakhotia <suyashlakhotia@gmail.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
Suyash Lakhotia
2016-11-03 10:55:07 +08:00
committed by Mihai Tudor Panu
parent b3991979ad
commit 1aa748e3d6
5 changed files with 126 additions and 134 deletions

View File

@ -22,25 +22,23 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
// Load Grove module
// Load UPM module
var waterSensor = require('jsupm_water');
// Instantiate a Water sensor on digital pin D2
var water = new waterSensor.Water(2);
// Read whether the sensor is wet/dry, waiting one second between readings
function readWaterState()
{
if (water.isWet())
console.log("Sensor is wet");
else
console.log("Sensor is dry");
function readWaterState() {
if (water.isWet())
console.log("Sensor is wet");
else
console.log("Sensor is dry");
}
setInterval(readWaterState, 1000);
// Print message when exiting
process.on('SIGINT', function()
{
console.log("Exiting...");
process.exit(0);
process.on('SIGINT', function() {
console.log("Exiting...");
process.exit(0);
});