Enable A7 for PWM, cause it works. It is needed for using the shield shield with a L298 shield with the default configuration.
Update to address proper indexing of servo array
Pins A4 and A5 also support PWM just fine
Correct comment to proper number
A6 supports PWM too, as well as correcting the pin reference
Cleanup on disconnect

The program on the spark runs forever which means that any state created by one connection would be persisted to the next connection.

- reset values in pin reading list
- reset values in pin previous list
- detach servos

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
Correct pin indexes for A4-A7 (14-17)

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
V2.2.0

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
Fix analog value reporting by splitting the 12-bit ADC value into 2 7-bit bytes. Fixes gh-20

This is a major change that will affect only client implementations. Currently, Spark-IO is the only one known client implementation.

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
Add link to #20

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
Buffer cache redesign

- Write all incoming bytes to a buffer
- When action bytes are identified, start tracking bytes read vs. bytes expected
- Upon receipt of correct number of bytes copy relevant buffer to cache
- Shift unused bytes in buffer to front
- Carry out action from cache
- Clear cache upon completion

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
Servo detachment doesn't need it's own special command. Changing pinMode is sufficient to indicate detachment

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
Disable memory hogs

These three objects are not currently in use by any voodoospark client implementation:

- Wire
- SPI
- Serial

It's hard to reliably reproduce a board crash, but any combination that includes one or more of these can easily lead to a crash. These will remain disabled until we know more about what causes the crash and the whether or not there is actual utility value in their inclusion (e.g. user request)

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
Re-enabled Serial api

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
re-disable Serial, it's too much

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
saves about 1120 bytes of flash
More defense against lost commands: process input until all read bytes are exhausted. Fixes gh-27

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>