Skip to content

Commit

Permalink
Merge pull request #723 from Resseguie/io-plugin-eg
Browse files Browse the repository at this point in the history
Add io-plugin examples
  • Loading branch information
rwaldron committed Apr 10, 2015
2 parents a19991c + 1f49c59 commit 522ee92
Show file tree
Hide file tree
Showing 31 changed files with 909 additions and 79 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,6 @@ board.on("ready", function() {
- [Temperature - DS18B20](https://github.com/rwaldron/johnny-five/blob/master/docs/temperature-ds18b20.md)
- [Temperature - MPU6050](https://github.com/rwaldron/johnny-five/blob/master/docs/temperature-mpu6050.md)

### Plugin Template
- [Example plugin](https://github.com/rwaldron/johnny-five/blob/master/docs/plugin.md)

### Grove IoT Kit (Seeed Studio)
- [Grove - LED](https://github.com/rwaldron/johnny-five/blob/master/docs/grove-led.md)
- [Grove - Button](https://github.com/rwaldron/johnny-five/blob/master/docs/grove-button.md)
Expand Down Expand Up @@ -342,6 +339,18 @@ board.on("ready", function() {
- [Laser Trip Wire](https://github.com/rwaldron/johnny-five/blob/master/docs/laser-trip-wire.md)
- [Radar](https://github.com/rwaldron/johnny-five/blob/master/docs/radar.md)

### Component Plugin Template
- [Example plugin](https://github.com/rwaldron/johnny-five/blob/master/docs/plugin.md)

### IO Plugins
- [Led Blink on Electric Imp](https://github.com/rwaldron/johnny-five/blob/master/docs/imp-io.md)
- [Led Blink on Spark Core](https://github.com/rwaldron/johnny-five/blob/master/docs/spark-io.md)
- [Led Blink on pcDuino3](https://github.com/rwaldron/johnny-five/blob/master/docs/pcduino-io.md)
- [Led Blink on Intel Galileo Gen 2](https://github.com/rwaldron/johnny-five/blob/master/docs/galileo-io.md)
- [Led Blink on Raspberry Pi](https://github.com/rwaldron/johnny-five/blob/master/docs/raspi-io.md)
- [Led Blink on Intel Edison Arduino Board](https://github.com/rwaldron/johnny-five/blob/master/docs/edison-io-arduino.md)
- [Led Blink on Intel Edison Mini Board](https://github.com/rwaldron/johnny-five/blob/master/docs/edison-io-miniboard.md)

<!--extract-end:examples-->


Expand Down
Binary file added docs/breadboard/imp-led.fzz
Binary file not shown.
Binary file added docs/breadboard/imp-led.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/breadboard/led-1-edison-miniboard.fzz
Binary file not shown.
Binary file added docs/breadboard/led-1-edison-miniboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/breadboard/led-13-raspberry-pi.fzz
Binary file not shown.
Binary file added docs/breadboard/led-13-raspberry-pi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/breadboard/spark-led.fzz
Binary file not shown.
Binary file added docs/breadboard/spark-led.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
81 changes: 81 additions & 0 deletions docs/edison-io-arduino.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<!--remove-start-->

# Led Blink on Intel Edison Arduino Board


Example using Johnny-Five + Edison-IO to directly control an Intel Edison


Run with:
```bash
node eg/edison-io-arduino.js
```

<!--remove-end-->

```javascript
var five = require("johnny-five");
var Edison = require("edison-io");
var board = new five.Board({
io: new Edison()
});

board.on("ready", function() {
var led = new five.Led(13);
led.blink();
});


```


## Illustrations / Photos


### Intel Edison Arduino Board



![docs/images/edison-arduino-board.jpg](images/edison-arduino-board.jpg)

### LED on pin 13



![docs/breadboard/led-13-edison-arduinoboard.png](breadboard/led-13-edison-arduinoboard.png)<br>

Fritzing diagram: [docs/breadboard/led-13-edison-arduinoboard.fzz](breadboard/led-13-edison-arduinoboard.fzz)

&nbsp;





## Additional Notes

In order to use the Edison-IO library, you will need to flash the Intel IoTDevKit Image
on your Edison. Once the environment is created, install Johnny-Five and Edison-IO.

```sh
npm install johnny-five edison-io
```




## Learn More

- [edison-io on GitHub](https://github.com/rwaldron/edison-io/)

&nbsp;

<!--remove-start-->

## License
Copyright (c) 2012, 2013, 2014 Rick Waldron <waldron.rick@gmail.com>
Licensed under the MIT license.
Copyright (c) 2014, 2015 The Johnny-Five Contributors
Licensed under the MIT license.

<!--remove-end-->
81 changes: 81 additions & 0 deletions docs/edison-io-miniboard.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<!--remove-start-->

# Led Blink on Intel Edison Mini Board


Example using Johnny-Five + Edison-IO to directly control an Intel Edison


Run with:
```bash
node eg/edison-io-miniboard.js
```

<!--remove-end-->

```javascript
var five = require("johnny-five");
var Edison = require("edison-io");
var board = new five.Board({
io: new Edison()
});

board.on("ready", function() {
var led = new five.Led(1);
led.blink();
});


```


## Illustrations / Photos


### Intel Edison Mini Board



![docs/images/edison-mini-board.jpg](images/edison-mini-board.jpg)

### LED on pin 1



![docs/breadboard/led-1-edison-miniboard.png](breadboard/led-1-edison-miniboard.png)<br>

Fritzing diagram: [docs/breadboard/led-1-edison-miniboard.fzz](breadboard/led-1-edison-miniboard.fzz)

&nbsp;





## Additional Notes

In order to use the Edison-IO library, you will need to flash the Intel IoTDevKit Image
on your Edison. Once the environment is created, install Johnny-Five and Edison-IO.

```sh
npm install johnny-five edison-io
```




## Learn More

- [edison-io on GitHub](https://github.com/rwaldron/edison-io/)

&nbsp;

<!--remove-start-->

## License
Copyright (c) 2012, 2013, 2014 Rick Waldron <waldron.rick@gmail.com>
Licensed under the MIT license.
Copyright (c) 2014, 2015 The Johnny-Five Contributors
Licensed under the MIT license.

<!--remove-end-->
81 changes: 81 additions & 0 deletions docs/galileo-io.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<!--remove-start-->

# Led Blink on Intel Galileo Gen 2


Example using Johnny-Five + Galileo-IO to directly control an Intel Galileo Gen 2


Run with:
```bash
node eg/galileo-io.js
```

<!--remove-end-->

```javascript
var five = require("johnny-five");
var Galileo = require("galileo-io");
var board = new five.Board({
io: new Galileo()
});

board.on("ready", function() {
var led = new five.Led(13);
led.blink();
});


```


## Illustrations / Photos


### Galileo Gen 2



![docs/images/galileo-gen2.jpg](images/galileo-gen2.jpg)

### LED on pin 13



![docs/breadboard/led-13-galileo.png](breadboard/led-13-galileo.png)<br>

Fritzing diagram: [docs/breadboard/led-13-galileo.fzz](breadboard/led-13-galileo.fzz)

&nbsp;





## Additional Notes

In order to use the Galileo-IO library, you will need to flash the Intel IoTDevKit Image
on your Galileo Gen 2. Once the environment is created, install Johnny-Five and Galileo-IO.

```sh
npm install johnny-five galileo-io
```




## Learn More

- [galileo-io on GitHub](https://github.com/rwaldron/galileo-io/)

&nbsp;

<!--remove-start-->

## License
Copyright (c) 2012, 2013, 2014 Rick Waldron <waldron.rick@gmail.com>
Licensed under the MIT license.
Copyright (c) 2014, 2015 The Johnny-Five Contributors
Licensed under the MIT license.

<!--remove-end-->
Binary file added docs/images/edison-arduino-board.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/edison-mini-board.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/galileo-gen2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/imp.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/pcduino.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/spark-core.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
98 changes: 98 additions & 0 deletions docs/imp-io.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<!--remove-start-->

# Led Blink on Electric Imp


Example using Johnny-Five + imp-io to control an Electric Imp.


Run with:
```bash
node eg/imp-io.js
```

<!--remove-end-->

```javascript
var five = require("johnny-five");
var Imp = require("imp-io");

var board = new five.Board({
io: new Imp({
agent: process.env.IMP_AGENT_ID
})
});

board.on("ready", function() {
var led = new five.Led(9);
led.blink();
});

```


## Illustrations / Photos


### Electric Imp



![docs/images/imp.jpg](images/imp.jpg)

### LED on pin 9



![docs/breadboard/imp-led.png](breadboard/imp-led.png)<br>

Fritzing diagram: [docs/breadboard/imp-led.fzz](breadboard/imp-led.fzz)

&nbsp;





## Additional Notes

To communicate with an Electric Imp using Johnny-Five w/ Imp-IO,
you will need to upload the special
[Tyrion](https://github.com/rwaldron/tyrion)
**[agent](https://github.com/rwaldron/tyrion/blob/master/agent.nut)** and
**[device](https://github.com/rwaldron/tyrion/blob/master/device.nut)**
firmware through Electric Imp's [IDE](https://ide.electricimp.com/login).
We recommend you review
[Electric Imp's Getting Started](http://www.electricimp.com/docs/gettingstarted/)
before continuing.

Store your agent ID in a dot file so it can be accessed as a property of `process.env`.
Create a file in your home directory called `.imprc` that contains:

```sh
export IMP_AGENT_ID="your agent id"
```

Then add the following to your dot-rc file of choice:

```sh
source ~/.imprc
```



## Learn More

- [imp-io on GitHub](https://github.com/rwaldron/imp-io)

&nbsp;

<!--remove-start-->

## License
Copyright (c) 2012, 2013, 2014 Rick Waldron <waldron.rick@gmail.com>
Licensed under the MIT license.
Copyright (c) 2014, 2015 The Johnny-Five Contributors
Licensed under the MIT license.

<!--remove-end-->
Loading

0 comments on commit 522ee92

Please sign in to comment.