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.

  • 23 views
  • 0 comments
  • 0 respects

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'

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

Code

NodeRED rgb leds
Github repository containing codes & NodeRED flows

Comments

Similar projects you might like

Magic Lamp

by Nekhil ravi

  • 973 views
  • 3 comments
  • 11 respects

Arduino MKR GSM 1400 and DTMF

by Arduino_Genuino

  • 3,812 views
  • 0 comments
  • 11 respects

Love You Pillow

Project tutorial by Arduino

  • 2,296 views
  • 0 comments
  • 5 respects

Infrared Replicator

Project tutorial by Gustavo Gonnet

  • 3,774 views
  • 6 comments
  • 26 respects

Arduino Ethernet Controller

Project showcase by TATCO Inc

  • 106 views
  • 0 comments
  • 4 respects

A Model Lighthouse Using an Adafruit NeoPixel Ring

Project tutorial by Jeremy Lindsay

  • 412 views
  • 0 comments
  • 4 respects
Add projectSign up / Login