Skip to content

Prerequisites

Greg Long edited this page Oct 7, 2015 · 3 revisions

Contents

  1. Background
  2. Downloading and Installing
    1. Raspberry Pi
    2. Arduino
### Background

This project makes use of a number of other open source projects. A group of libraries know as RF24 is used to provide the mesh network functionality for the nRF24 modules. Node.js and related plugins are used to provide a lightweight HTTP server. Curl is used by the master_node program to POST data to the lightweight HTTP server.

### Downloading and Installing #### Raspberry Pi
RF24 Libraries

The set of libraries needed are:

  • RF24 Core
  • RF24 Network
  • RF24 Mesh
  • RF24 Ethernet
  • RF24 Gateway

Detailed information for each of these libraries along with getting started examples is available at: http://tmrh20.github.io/RF24/index.html

The developer of these libraries has provided a script to install and compile all the necessary libraries on the Raspberry Pi.

The installer will prompt to install each of the libraries and build a RF24Gateway example, all the libraries are needed, the RF24Gateway example is not needed for this project however allow the script to build it as it can be used for troubleshooting.

On the Raspberry Pi:

wget http://tmrh20.github.io/RF24Installer/RPi/install.sh  
chmod +x install.sh  
./install.sh 
node.js

Steps for installing node.js on Raspbian are reproduced from: https://learn.adafruit.com/node-embedded-development/installing-node-dot-js

The first step will be to add the apt.adafruit.com package repository to your Pi's /etc/apt/sources.list file. You can do this by running the following command.

curl -sLS https://apt.adafruit.com/add | sudo bash

Next, we will install the latest version of node.js using apt-get.

sudo apt-get install node

If everything went as expected, we can check the installed version of node.js by running node -v. At the time of this writing, the latest stable version of node.js was v0.12.6.

pi@raspberrypi ~ $ node -v
v0.12.6
Curl

The curl development library can be installed using the APT package tool.

apt-get install libcurl4-openssl-dev
#### Arduino The libraries needed for the arduino are the RF24 libraries.

They need to be downloaded, unzipped and placed into the Arduino IDE libraries folder.

Refer to the instructions from Arduino for manual installing libraries available here: https://www.arduino.cc/en/Guide/Libraries#toc5

You should rename the unzipped folder to remove the -master from the name.