mirror of
https://github.com/eclipse/upm.git
synced 2025-07-02 01:41:12 +03:00
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:

committed by
Mihai Tudor Panu

parent
b3991979ad
commit
1aa748e3d6
@ -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);
|
||||
});
|
||||
|
Reference in New Issue
Block a user