Controlling Arduino From Node-RED With Firmware Firmata IoT#

by Jhon_Control in Circuits > Arduino

9505 Views, 5 Favorites, 0 Comments

Controlling Arduino From Node-RED With Firmware Firmata IoT#

Arduino_node-red_firmata_mini.png

In this opportunity we will use Node-RED to control and Arduino MEGA 2560 R3, thanks to the collaboration of a colleague Absolutely Automation I indicated this method that allows to easily control an Arduino if complications.

Also in one of the comments does anyone consult if there is a more practical way to control from Arduino and Node-RED ?

I've decided to do a tutorial to take this solution into account.

In my case I have installed Node-RED on my pc with lubuntu, in other applications can be installed on a Raspberry pi, although you must take into account the speed and performance in case of very complex applications.

More Info: PDAControl
English version: Controlling Arduino from Node-RED with Firmware Firmata
http://pdacontrolen.com/controlling-arduino-from-...

Version en Español:Controlar Arduino desde Node-RED con Firmware Firmata http://pdacontroles.com/controlar-arduino-desde-n...

Materials

20170906_213412.jpg

I Recommend a Linux Operating System.... Lubuntu

Instalar Lubuntu - Install Lubuntu : PDAControl

I recommend a linux operating system in my case Lubuntu, light and fast

below a solution if they are Windows users.

Create a virtual machine with Virtualbox in Windows and in a few steps mount a Linux system

Tutorial Recomended:

Install lubuntu (Ubuntu) from Scratch on Virtualbox

http://pdacontrolen.com/install-ubuntu-ubuntu-from...

​Permanent Installation

Migration to Complete to Lubuntu  Part 1/2: PDAControl

Permanent installation

You can also install lubuntu permanently, in my case leave windows, good is an option ..

Tutorial Recomended:

Full Migration to Lubuntu Operating System

http://pdacontrolen.com/full-migration-to-lubuntu-...

Install Node-RED

Simple installation Node-RED IoT Platform connections: PDAControl

Install Node-RED

For a long time I had wanted to try this platform called Node-red created by IBM, it was developed in nodejs, Node network is developed by Nick O’Leary and Dave Conway-Jones thanks for your contributions.

Tutorial Recomended: Install Node-RED

http://pdacontrolen.com/installation-node-red-plat...

But what is Node-Red?

It is an open source graphic tool based on connection of nodes that contain API’S and / or services for the communication and / or connection of devices for the Internet

Tutorials Node-RED:

http://pdacontrolen.com/installation-node-red-plat...

Install Nodes for Arduino

nodes.png
nodes_FILTTO.png

Install Nodes for Arduino

From Node-RED from the node palette we can directly install the Arduino nodes, and in the example we will copy the basic blink example in the arduino GPIO 13.

Node-RED Tutorials

information package npm: node-red-node-arduino

Upload Firmware Firmware From Arduino IDE

code.png

Upload Firmware Firmware from Arduino IDE

This code technically is a very fast protocol that directs the control of GPIO, ADC, PWM and handling of Strings through the serial port, there are several versions of the firmware but we will use StandardFirmata included in the sample libraries.

​Conclusions and Considerations

20170906_213531.jpg
Arduino_node-red_firmata.png

Conclusions and Considerations

A timely solution for simple applications that allow the blade to be connected directly to the PC. The great disadvantage in general of the controls made from an external platform, without executing code properly on the board, is the safety or autonomy in case of disconnection in this case, disconnection of Node-RED

but guaranteeing a robust hardware should not be feared.


More Info: PDAControl

English version

Controlling Arduino from Node-RED with Firmware Firmata

http://pdacontrolen.com/controlling-arduino-from-n...

Version en Español

Controlar Arduino desde Node-RED con Firmware Firmata

http://pdacontroles.com/controlar-arduino-desde-no...