Desmond  Gerber

Desmond Gerber


Raspi-IO: Compatibility Library for The Raspberry Pi

Raspi IO

NOTE: This project is in maintenance mode and no longer actively maintained.

Raspi IO is an I/O plugin for the Johnny-Five Node.js robotics platform that enables Johnny-Five to control the hardware on a Raspberry Pi. The API docs for this module can be found on the Johnny-Five I/O Plugin specification page, except for the constructor which is documented below. Raspi IO supports all models of the Raspberry Pi, except for the Model A and compute modules.

If you have a bug report, feature request, or wish to contribute code, please be sure to check out the Contributing Guide.

System Requirements

  • Raspberry Pi Model B Rev 1 or newer (sorry Model A users), except compute modules
  • Raspbian Jessie or newer
  • Node 6.4.0 or newer

Detailed instructions for getting a Raspberry Pi ready for NodeBots, including how to install Node.js, can be found in the wiki

Warning: this module must be installed as a normal user, but run as the root user


Install with npm on a Raspberry Pi (not a laptop):

npm install raspi-io

Note: You must reboot your Raspberry Pi the first time you install Raspi IO on it!


Using Raspi IO inside of Johnny-Five is fairly straightforward, although does take an extra step compared to using Johnny-Five on the Arduino Uno:

const Raspi = require('raspi-io').RaspiIO;
const five = require('johnny-five');
const board = new five.Board({
  io: new Raspi()

board.on('ready', () => {

  // Create an Led on pin 7 (GPIO4) on P1 and strobe it on/off
  // Optionally set the speed; defaults to 100ms
  (new five.Led('P1-7')).strobe();


Then, run your code with:

sudo node index.js

The io property must be specified explicitly to differentiate from trying to control, say, an Arduino Uno that is plugged into the Raspberry Pi. Note that we specify the pin as "P1-7", not 7. See the section on pins below for an explanation of the pin numbering scheme on the Raspberry Pi, which can be a bit confusing.

Warning: this module must be run as root, even though it cannot be installed as root.

Note: This module is not intended to be used directly. If you do not want to use Johnny-Five, I recommend taking a look at Raspi.js, which underpins this library and is a little more straight-forward to use than using Raspi IO directly.

Important Notes

Pin Naming

The pins on the Raspberry Pi are a little complicated. There are multiple headers on some Raspberry Pis with extra pins, and the pin numbers are not consistent between Raspberry Pi board versions.

To help make it easier, you can specify pins in three ways. The first is to specify the pin by function, e.g. 'GPIO18'. The second way is to specify by pin number, which is specified in the form "P[header]-[pin]", e.g. 'P1-7'. The final way is specify the Wiring Pi virtual pin number, e.g. 7. If you specify a number instead of a string, it is assumed to be a Wiring Pi number.

Be sure to read the full list of pins on the supported models of the Raspberry Pi.

I2C notes

There are a few limitations and extra steps to be aware of when using I2C on the Raspberry Pi.

First, note that the I2C pins can only be used for I2C with Raspi IO, even though they are capable of GPIO at the hardware level.

Also note that you will need to edit /boot/config.txt in order to change the I2C baud rate from the default, if you need to. If you notice that behavior is unstable while trying to communicate with another microcontroller, try setting the baudrate to 10000 from the default 100000. This instability has been observed on the Arduino Nano before.

After you install Raspi IO for the first time, you must reboot your Raspberry Pi. I2C support is not enabled by default, and this module runs a script to enable it automatically and adjust a few I2C settings. These settings will not take effect until you reboot your Pi.

Finally, if you try to access a device that doesn't exist, you will get an error stating EIO, i/o error (sorry it's not very descriptive, but it comes from the operating system and I can't change it).

Serial notes

There are also a few limtations and extra steps to be aware of when using Serial (UART) on the Raspberry Pi.

As with I2C, the serial pins can only be used for serial with Raspi IO, even though they are capable of GPIO at the hardware level.

If you are not running a Raspberry Pi without WiFi:

All older versions of the Raspberry Pi enable a TTY console over serial, meaning that you can use the screen command on *NIX computers to log in to the Raspberry Pi over serial. This can get in the way of using the serial port for robotics, however. To disable TTY over serial, do the following:

  1. Run sudo raspi-config to start the Raspberry Pi configuration utility
  2. Select 5 Interface Options
  3. Select P6 Serial Options
  4. Select No when asked Would you like a login shell to be accessible over serial?
  5. Select Yes when asked Would you like the serial port hardware to be enabled?
  6. Select OK
  7. Select Finish and select Yes to reboot when prompted

WARNING: If you are running a Raspberry Pi with WiFi:

The Bluetooth module on these Raspberry Pis is controlled using the serial port, meaning it cannot be used directly while also using Bluetooth. Using this module with the default serial port will disable bluetooth!

For an in-depth discussion on why and how to work around it, read


new RaspiIO(options)

Instantiates a new Raspi IO instance with the given options


options (optional)ObjectThe configuration options.
enableSerial (optional)booleanEnables the use of the serial port by Johnny-Five. The default is true, except on models with Bluetooth where it is false (currently the Raspberry Pi 3 Model B, Raspberry Pi 3 Model B+, and Raspbery Pi Zero W)
enableI2C (optional)booleanEnables the use of the I2C port by Johnny-Five. The default is true
includePins (optional)Array<Number|String>A list of pins to include in initialization. If specified, any pins not listed here will not be initialized or available for use by Raspi IO. If not specified, all pins will be available for use by Raspi IO.
excludePins (optional)Array<Number|String>A list of pins to exclude from initialization. If specified, any pins listed here will not be initialized or available for use by Raspi IO. If not specified, all pins will be available for use by Raspi IO.

Author: Nebrius
Source Code: 
License: MIT license

#node #javascript #raspberrypi 

What is GEEK

Buddha Community

Raspi-IO: Compatibility Library for The Raspberry Pi

Tools and Images to Build a Raspberry Pi n8n server


Tools and Images to Build a Raspberry Pi n8n server


The purpose of this project is to create a Raspberry Pi image preconfigured with n8n so that it runs out of the box.

What is n8n?

n8n is a no-code/low code environment used to connect and automate different systems and services. It is programmed using a series of connected nodes that receive, transform, and then transmit date from and to other nodes. Each node represents a service or system allowing these different entities to interact. All of this is done using a WebUI.

Why n8n-pi?

Whevever a new technology is released, two common barriers often prevent potential users from trying out the technology:

  1. System costs
  2. Installation & configuration challenges

The n8n-pi project eliminates these two roadblocks by preconfiguring a working system that runs on easily available, low cost hardware. For as little as $40 and a few minutes, they can have a full n8n system up and running.


This project would not be possible if it was not for the help of the following:


All documentation for this project can be found at

Download Details:

Author: TephlonDude


#pi #raspberry pi #raspberry #raspberry-pi

TensorFlow Lite Object Detection using Raspberry Pi and Pi Camera

I have not created the Object Detection model, I have just merely cloned Google’s Tensor Flow Lite model and followed their Raspberry Pi Tutorial which they talked about in the Readme! You don’t need to use this article if you understand everything from the Readme. I merely talk about what I did!


  • I have used a Raspberry Pi 3 Model B and PI Camera Board (3D printed a case for camera board). **I had this connected before starting and did not include this in the 90 minutes **(plenty of YouTube videos showing how to do this depending on what Pi model you have. I used a video like this a while ago!)

  • I have used my Apple Macbook which is Linux at heart and so is the Raspberry Pi. By using Apple you don’t need to install any applications to interact with the Raspberry Pi, but on Windows you do (I will explain where to go in the article if you use windows)

#raspberry-pi #object-detection #raspberry-pi-camera #tensorflow-lite #tensorflow #tensorflow lite object detection using raspberry pi and pi camera

The Raspberry Pi 400 - A full computer in a keyboard!

The Raspberry Pi 400 has arrived in the studio, and in this video I’ll give it a review. I’ll show an unboxing of the Personal Computer Kit from Canakit, which is a great way to get started on the Pi 400. Then I’ll show off the hardware, as well as the out-of-box experience.

#raspberry pi #pi #raspberry-pi

iOS App Development Company in Singapore

iOS app development in Singapore

iOS has become the first priority for most smartphone users because of the security it offers compares to the Android operating system. Due to this reason, it is suggested to launch an app in iOS before other platforms.

Want to develop an iOS app in Singapore?

WebClues Infotech with its worldwide reach has already offered its iOS app development services to customers in Singapore. With a highly-skilled development team of 120+ members, WebClues Infotech has got the required resources an agency needs to fulfil client requirements around the world.

Want to know more about our iOS app development services in Singapore?


Share your requirements

View Portfolio

#ios app development in singapore #ios app development company #ios app development #ios #ios app #hire ios developer

iOS App Development in the United Arab Emirates

iOS App Development in the United Arab Emirates

Developed and Developing nations have seen a rapid rise in the demand for iOS app development and the United Arab Emirates is no exception. The use of on-demand apps has increased drastically in the last decade and business is leveraging this demand with launching iOS mobile apps.

Want to develop the iOS app in the United Arab Emirates?

WebClues Infotech after serving multiple clients in UAE has become well aware of the people’s needs in the region. With a highly experienced development team that has completed more than 950+ projects, we are prepared to serve you with your iOS app development needs.

Want to know more about our iOS App Development Services in UAE?


Share your requirements

View Portfolio

#ios app development in the united arab emirates #ios app development #ios app #ios #ios app development company #hire ios developer