Skip to content

Commit

Permalink
* Added experimental support for Photon boards
Browse files Browse the repository at this point in the history
* Updated dependency on pimatic-plugin-commons
  • Loading branch information
mwittig committed Dec 28, 2015
1 parent 15e4672 commit 7589e7b
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 5 deletions.
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
![Logo](https://github.com/mwittig/pimatic-johnny-five/raw/master/assets/images/johnny-five-icon.png)

Pimatic Plugin for [Johnny Five](http://johnny-five.io), a Robotics and IoT programming framework. Thanks to
Johnny Five, you can easily integrate a wide range of sensors and actuators attached to an Arduino board or your
Johnny Five, you can easily integrate a wide range of sensors and actuators attached to an Arduino board or your
Raspberry Pi. On Arduino, the universal Firmata library is used which implements a protocol for the communication with
host computer. Thus, there is no need to modify the Arduino sketch when new sensors or actuators are connected to your
Arduino. Johnny Five also supports a variety of [I2C](https://en.wikipedia.org/wiki/I%C2%B2C) and
Expand All @@ -23,8 +23,8 @@ This version supports the following devices
The OLED and LCD display devices are incomplete and, thus, should not be used.
They won't do anything useful anyway.

Board-support has been mainly tested with "arduino". More testing for "raspi-io" will follow. The "etherport"
support is highly experimental at the moment.
Board-support has been mainly tested with "arduino". More testing for "raspi-io" will follow. The "etherport" and
"particle-io" support is highly experimental at the moment.

## Getting Started

Expand Down Expand Up @@ -69,8 +69,19 @@ The configuration for a board is an object comprising the following properties.
| Property | Default | Type | Description |
|:----------|:----------|:--------|:--------------------------------------------|
| id | - | String | Unique identifier used as a reference by a device configuration |
| boardType | "arduino" | String | The type of board, one of "arduino", "raspi-io", "etherport" |
| boardType | "arduino" | String | The type of board, see supported types below |
| port | - | String | Path or name of device port |
| token | - | String | Particle token. Only required for particle-io board type |
| deviceId | - | String | Particle device id. Only required for particle-io board type |

Supported `boardTypes`
* "arduino" - see
* "raspi-io" - see
* "particle-io" - experimental, should work for
[Particle Photon](http://johnny-five.io/platform-support/#particle-photon) and
[Sparkfun Photon RedBoard](http://johnny-five.io/platform-support/#sparkfun-photon-redboard)
* "etherport" - experimental, works for Arduinos with ethernet or wifi shields,
relay will be provided soon.


## Device Configuration
Expand Down
4 changes: 4 additions & 0 deletions board-manager.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ module.exports = (env) ->
raspi = require 'raspi-io'
@board = new BoardWrapper(_.assign({}, options, {io: new raspi(), repl: false}))
)
when 'spark-io' then (
spark = require 'spark-io'
@board = new BoardWrapper(_.assign({}, options, {io: new spark(), repl: false}))
)
when 'etherport' then (
etherport = require 'etherport'
firmata = require('firmata')
Expand Down
11 changes: 11 additions & 0 deletions johnny-five-config-schema.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,16 @@ module.exports = {
description: "Path or name of device port"
type: "string"
default: ""
token:
description: "Particle token. Only required for particle-io board type"
type: "string"
default: ""
deviceId:
description: "Particle devicde id. Only required for particle-io board type"
type: "string"
default: ""




}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@
"johnny-five": "^0.9.17",
"oled-font-5x7": "^1.0.0",
"oled-js": "^4.0.1",
"pimatic-plugin-commons": "^0.8.3"
"pimatic-plugin-commons": "^0.8.5"
},
"optionalDependencies": {
"particle-io": "^0.12.0",
"raspi-io": "^5.0.0"
},
"peerDependencies": {
Expand Down

0 comments on commit 7589e7b

Please sign in to comment.