Skip to content

Commit

Permalink
Readme format
Browse files Browse the repository at this point in the history
  • Loading branch information
rwaldron committed Dec 18, 2014
1 parent a40bf8e commit 1b6197d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,40 +81,51 @@ If you run *firmata* from the command line it will prompt you for the usb port.

### Servo

`board.servoWrite(pin,degree)`
`board.servoWrite(pin, degree)`

Write a degree value to a servo pin.

`board.servoConfig(pin, min, max)`

Setup a servo with a specific min and max pulse (call instead of `pinMode`, which will provide default).

### I2C

`board.i2cConfig([delay])`

Configure and enable I2C, optionally set a delay (defaults to `0`). Required to enable I2C communication.

`board.i2cWrite(address, [...bytes])`

Write an arbitrary number of bytes. May not exceed 64 Bytes.

`board.i2cWrite(address, register, [...bytes])`

Write an arbitrary number of bytes to the specified register. May not exceed 64 Bytes.

`board.i2cWriteReg(address, register, byte)`

Write a byte value to a specific register.

`board.i2cRead(address, numberOfBytesToRead, handler(data))`

Read a specified number of bytes, continuously. `handler` receives an array of values, with a length corresponding to the number of read bytes.

`board.i2cRead(address, register, numberOfBytesToRead, handler(data))`

Read a specified number of bytes from a register, continuously. `handler` receives an array of values, with a length corresponding to the number of read bytes.

`board.i2cReadOnce(address, numberOfBytesToRead, handler(data))`

Read a specified number of bytes, one time. `handler` receives an array of values, with a length corresponding to the number of read bytes.

`board.i2cReadOnce(address, register, numberOfBytesToRead, handler(data))`

Read a specified number of bytes from a register, one time. `handler` receives an array of values, with a length corresponding to the number of read bytes.


`board.sendI2CConfig(delay)` **Deprecated**

Set I2C Config on the arduino

`board.sendI2CWriteRequest(slaveAddress,[bytes])` **Deprecated**
Expand Down

0 comments on commit 1b6197d

Please sign in to comment.