Wednesday, April 13, 2016

Step-by-Step Procedure #1: Starting a Node-Red Server on RPi

This tutorial is based upon information from the Ubidots blog post:


Equipment needed:
Raspberry Pi Model B+ or later with compatible micro USB power supply
Wireless keyboard with USB reciever
USB wi-fi adapter or Cat5 Ethernet cable
PIR sensor - please note that the PIR I used had 3 pins extending from the bottom of the sensor. The link for the Adafruit sensor has three-wire adapter that gives you more options for soldering longer wires and more flexibility for sensor placement (i.e. mounted on a ceiling).
HDMI Cable
LED monitor or TV with HDMI input
Internet Connection

Click on smaller thumbnail photos to enlarge.
Here is a picture of the PIR circuit that connects to the GPIO of the Raspberry Pi via the T-Cobbler breakout cable (the blue T shaped piece).


Close up of backside of the PIR sensor. The blue wire connects to the GND (ground) of the PIR and loops over to the negative rail on the side of the breadboard; this added grounding cable gives you the flexibility to have your PIR sensor at the far end of the breadboard for optimal clearance for sensing motion. The yellow wire connects to the 5.0V output from the T-Cobbler. The orange wire is the Out that connects to the #26 pin of the T-Cobbler that sends the sensor info to the GPIO on the RPi.

Once you have your circuit built, open up Node-Red under “Programming” in the RPi main menu.

Your Node-Red server console should open, showing the server IP address (URL) in the upper righthand corner of the console. Select and copy the URL.

Open up Midori or any other web browser and paste the Node-Red URL you copied into the address field of the browser. The Node-Red controller (graphic user interface) should load in your browser. This is where you will enter your “flow” to determine what your Node-Red server interacts with for the Internet of Things.

Now you are ready to start building your first Node-Red flow:
Video tutorial on Creating a Node-Red Flow to Collect Tweets (from around the globe).

For students doing the environmental science assignment: If you choose to use Node-Red as your final project focus, please note that this tutorial is designed to provide a starting point for you to do your own remixed adaptation and research other Node-Red projects that collect scientific data.

No comments:

Post a Comment