Skip to content

ev3-js/touch-sensor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

touch-sensor

NPM version Code style

read information from EV3 touch sensor

Installation

$ npm install touch-sensor

Usage

var TouchSensor = require('touch-sensor')
TouchSensor(3).value // => 0

API

TouchSensor(port)

  • port - number of port where the touch sensor is connected

Returns: instance of TouchSensor

.value

Get the value of the touch sensor.

Returns: either 0 or 1 to indicate the state of the touch sensor

value state
0 not pressed
1 pressed

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published