New MCU Nodes! #78
phoddie
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We've just added a suite of nodes to make it easier to work with MCU hardware. The new MCU nodes were inspired by the enthusiastic response to the original MCU Sensor node, which made it practical to wire many different sensors a Node-RED flow. This effort enhances the Sensor node and adds 10 new MCU hardware nodes, all with a clean, consistent user interface.
Here's an overview of what's new:
All the nodes provide detailed documentation on their inputs and outputs in the Node-RED Editor.
All of these nodes, except the Neopixels node, are based on classes defined by the ECMA-419 standard. The nodes editors link to the specification where possible.
Suggestions
There are probably features that can be added to these nodes to make them even easier to use. If you have ideas for refinements as you are working with these nodes, please reply to this announcement, open a new Discussion topic, or implement your idea to contribute to this project.
There are also other nodes that should eventually be added to the MCU node suite. For example, SPI In / Out and Serial In / Out nodes would be useful (ECMA-419 already defines both SPI and Serial).
Example
The new MCU I/O nodes can be combined to perform complex tasks. This flow uses the PulseWidth input and a Digital Output to implement the equivalent of the HC-SR04 proximity sensor driver using a few nodes.
HC-SR04
flows.json
Installing
To keep set-up simple, all of these nodes are installed into the Node-RED Editor by installing the Sensor node:
Raspberry Pi I/O Nodes
Some of the new MCU nodes replace Raspberry Pi I/O nodes. The RPi nodes were used in the initial Node-RED MCU Edition work as a convenient way to access I/O without having to create new node configuration dialogs. However, the RPi nodes have aren't always a good fit for MCUs because they enforce limitations that reflect the capabilities of the RPi hardware. The new MCU nodes are able to access more of the hardware capabilities.
Flows that use RPi nodes should continue to work. The
nodered2mcu
tool translates the RPi nodes to the MCU versions. This is useful for flows that need to run on both MCUs and RPi. Flows intended to only run on Node-RED MCU Edition should use the MCU nodes for maximum flexibility.Beta Was this translation helpful? Give feedback.
All reactions