Hi, Node-RED community:
I have been looking for a platform like this for some time but got hooked when the first time knowing it.
(or you just want to know what's related to the topic, jump to the bold line)
I had some experiment with ROS (robotic operating system), trying to build some simple sensor with ROS's Arduino/mbed library to publish message into the host, but the process was a pain and the result was a failure. The whole system was built locally on Cmake, and MCU build was also managed by it, which resulting unsuccessful/unknown SPI or I2C connection states.
Maybe it has gone too far to just read some data from a sensor, but my goal was to aggregate different sensors and do my test for algorithm iterations ASAP for a demo. ( combining 3D point cloud from a lidar scanner which I glued from some servo with a stereo camera)
Then the scavaging begin. There was a drone project called PX4 used Nuttx OS for ARM cortex-m series as their autopilot/flight control, I think that was a good idea, so many C program could be reused due to its POSIX interface, and onboard SD card with LFS like FS could make logging program streamlined with ease.
Now I have a glimpse(1 hour without actual testing) how this was done on Node-RED regarding Arduino. OH, NO... I don't think Arduino is my first choice. It has to be compiled and uploaded to get a working firmware first, with the overhead libraries to support Node-RED, and while you will have to cross fingers with the payload code to be working properly. An ideal way to get this done, in my current guess, is to integrate micropython for the payload code, Nuttx for the house management, and some Node-RED interface APP on Nuttx to get the job done.
This could work like gnuradio-companion, or simulink, build a stub on the graph, choose a board, write some (micro)python payload code and run the simulation. Well, we could run the graph and get a satisfying look, thanks to Node-RED's initiative and subtleties, then a js based micropython lexicon scanner could "compile" the code, (or even integrate this micropython vm into Node-RED, and), download this payload "firmware" to the ideal Nuttx board.
A simple graph i am trying to do with my keyboard could be like this:
Nuttx -> micropython -> Node-RED protocol -> Node-RED GUI
As this way we can get some distinctive features not existed yet as reasonable dev cost:
- easy to port to new MCU/Board
- standard (Nuttx)APP could be reused for resource-constrained devices
- firmware dev and platform dev could be paralleled
- much quicker to do a demo even you don't have the real sensor onboard was prototyped.
thanks for your reading.