Blink LED using Raspberry Pi, Node.JS and Johnny-Five. "Hello World" (Salam!) of Electronics! 😄
This demo originally presented at the Robotics & IoT Workshop.
-
Copy and paste this folder to Raspberry Pi using VNC Server (TigerVNC Viewer), or download the source code directly using Chromium web browser in Raspberry Pi.
-
If not already installed, install Node.JS in Raspberry Pi using the command below:
curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
sudo apt install -y nodejs
-
In Raspberry Pi Terminal, move to the directory which contains these code files
cd <path to your directory>
e.gcd /home/pi/Desktop/Robotics-IoT-Blink-LED
-
Install the required packages mentioned in
package.json
file using the command:npm install
-
Run the script
sudo $(which node) blink.js
If everything works fine, it should create a folder named node_modules
in the project directory.
Note: It is recommended to install node modules (packages) for each project separately in the project directory.
Good Luck! 👍
Workshop Slides
https://slides.com/skyimpel/iot-robotics-workshop-6#
Raspbian
The most popular and officially supported operating system for Raspberry Pi. A beginner should start with the desktop version of Raspbian.
https://www.raspberrypi.org/downloads/raspbian/
TigerVNC Viewer
A VNC server and client software for remote desktop sharing.
https://bintray.com/tigervnc/stable/tigervnc
Etcher
A tool for burning Raspbian image on SD card.
Johnny-Five
A Node.JS based Robotics and IoT framework.