0.1.20 • Published 8 years ago

color-sensor v0.1.20

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

color-sensor

NPM version Code style

use the ev3 color sensor

Installation

$ npm install ev3-js-color-sensor

Usage

var ColorSensor = require('color-sensor')
ColorSensor(1).reflected // => 88
ColorSensor(1).color // => 7

API

ColorSensor(port)

  • port - number of the port that the color sensor is plugged in to.

Returns: instance of ColorSensor

.reflected

Gets the value of the reflected light intensity.

Returns: number between 0 and 100

.color

Gets the value of the color.

Returns: color value between 0 and 7

numbercolor
0no color
1black
2blue
3green
4yellow
5red
6white
7brown

License

MIT

0.1.20

8 years ago

0.1.19

8 years ago

0.1.18

8 years ago

0.1.17

8 years ago

0.1.16

8 years ago

0.1.15

8 years ago

0.1.14

8 years ago

0.1.13

8 years ago

0.1.12

8 years ago

0.1.11

8 years ago

0.1.10

8 years ago

0.1.9

8 years ago

0.1.8

8 years ago

0.1.7

8 years ago

0.1.6

8 years ago