Project tutorial

Node RED - Internet - RGB LEDs © GPL3+

A Raspberry Pi web server, connected to Arduino & LEDs, serves NodeRED, flow is used to interact with Arduino from a UI controls RGB LEDs.

  • 811 views
  • 0 comments
  • 1 respect

Components and supplies

Apps and online services

About this project

1. The idea!

Node RED is supported in popular GPOS like Windows, Linux, Mac OS etc..

This means the project can be replicated in your PC!

I'm using my Raspberry Pi, with Raspbian Jessie which has pre-installed Node RED and npm.

NodeRED sends out serial messages through COM ports/tty to Arduino, connected to PC through USB. Arduino parses the string and generates PWM signal accordingly to control RGB leds.

2. Installing required npm modules

Before starting, you'll require a npm module, for UI. Details of the package can be found here and can be installed by

$ npm install node-red-contrib-ui --save

Once installed, the flows corresponding to UI will be visible on your NodeRED sidebar. UI page can be reached by appending '/ui' to the NodeRED address.

If you're in localhost and using the default NodeRED port 1880, then the following should display the UI screen:

localhost:1880/ui

3. Access from any device

Since Node RED runs as a server program, it is possible for any device in the network to connect (also from out of the network - IoT). Can control RPi's GPIO from any device, thus can control devices like relays for home automation, LEDs, motors etc.

4. Making it visible across internet

Once this project works perfectly in the intra-network, its time we can take it to the internet.

Raspberry Pi or a computer should be connected to home router, in which there should be an option Port Forwarding. Forward the internal IP and port 1880 (default for Node RED) from your router and it lets you access your PC anywhere from the world, provided you know the public IP.

5. Do it

Watch the video below of how to do it.

  • Connect Arduino circuit as shown.
  • Copy the .ino code from below github link and upload to Arduino.
  • Start Node RED in RPi or any computer you're using.
  • Copy from the json file, import flows by pasting it.
  • Click deploy, to upload the flow in Raspberry Pi or other PC.
Video demo of 'how to replicate'

Code

NodeRED rgb leds
Github repository containing codes & NodeRED flows

Schematics

Server side RGB leds, RPi & Arduino wiring
Arduino connected to Raspberry Pi's USB. To make it look smaller, I've used Arduino nano. Originally this project is done using Arduino Mega.
Rgb utirec8c1m

Comments

Similar projects you might like

A Microwave Interface for the IKEA Duktig Kids Kitchen

Project showcase by Myles Eftos

  • 1,445 views
  • 8 comments
  • 9 respects

Servo Signals and Characterization

by 3 developers

  • 1,410 views
  • 4 comments
  • 15 respects

Music Adaptive RGB LED with Arduino and Processing

Project in progress by ounane mohamed elfarouk

  • 1,105 views
  • 6 comments
  • 11 respects

Cellular IoT with Blynk & Hologram

by Moheeb Zara

  • 5,309 views
  • 9 comments
  • 19 respects

Monitoring Temperature Remotely with Blynk for Dummies

Project in progress by Cmtelesann

  • 1,342 views
  • 2 comments
  • 5 respects

How to Make a Customizable Punchable Keyboard Button

Project tutorial by Amal Mathew

  • 1,575 views
  • 4 comments
  • 4 respects
Add projectSign up / Login