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/ui3. 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 internetOnce 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 itWatch 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.
Comments