Bean-IO
Use bean-io + octoblu to run johnny-five with the Light Blue Bean
What are we doing?

This tutorial will guide you in setting up your Light Blue Bean (bluetooth Arduino), flashing it with firmata (firmware for dynamic pin control), and then using NodeJS on OSX/Linux to control it from Octoblu.
There is a wonderful NodeJS robotics framework called Johnny-Five that lets you use a common API accross multiple hardware platforms. By flashing bean-firmata to your bean and using Bean-IO for Johnny-Five, you'll be able to use Johnny-Five with your bean.
First, you'll need to set-up and flash a Light Blue Bean.
Set-up Bean Loader and Arduino
Install Bean Loader and the latest Arduino IDE
This guide will show you how! Getting Started with Light Blue Bean
Flash bean-firmata
- Open up the Arduino IDE
- Paste the bean-firmata sketch into the Arduino editor.

- Select Tools -> Boards -> Light Blue Bean

- Open up Bean Loader
- In the Arduino IDE press the arrow to Upload the firmware

Bean Loader will now show that the firmware is available for flashing to a bean

- Connect to your Bean, then right click and select "Program Sketch" , this can take a minute.

Set-Up NodeJS Script
- Clone this repo down meshblu-bean-io-examples
You can do so by typing this in the terminal
git clone https://github.com/octoblu/meshblu-bean-io-example
- Copy and paste this to your terminal whilst in the directory and hit enter.
npm install && \
node node_modules/meshblu-util/command-register.js -t bean-io > meshblu.json && \
node node_modules/meshblu-util/command-claim.js
Upon completion your browser will be launched and you will be prompted to claim a device in your Octoblu account. Give it a name and claim it.
- You can now run three different examples, each one has a corresponding flow (see next section)
To run them simply type:
node button-example.js
Octoblu Flows
Button Example
Flow: Octoblu Bean Button Example
Wiring: Hackster tutorial
Accelerometer and Temperature Example
Flow: Bean-io Accel-Temp Example
LED Example
Flow: Bean LED Flow
Pin Mappings
Bean to Arduino UNO
Bean Port | Arduino Pin | Type |
---|---|---|
A0 | 18 | Analog/Digital |
A1 | 19 | AnalogDigital |
0 | 6 | Digital — Unavailable right now from firmata |
1 | 9 | Digital — Unavailable right now from firmata |
2 | 10 | Digital |
3 | 11 | Digital |
4 | 12 | Digital |
5 | 13 | Digital |
Updated less than a minute ago