I see that many node developers calls Python from Node-Red.
This has advantages and disadvantages for node developer.
All my nodes are witten with this technique for the raspberry pi.
I plan to write a short instructions how you write code in C++ for Node-Red for my friends here.
But I have two problems:
My english is not so good.
I have no idea for examples
Can you help me and make suggestions for hardware or library that we call from C++ ?
I add your suggestions in my instructions.
Thanks you in advance.
Very interesting. Looking forward to read your instructions!!
Although that would be a more "advanced" example, it could be useful to demonstrate WHY it would be useful to implement some nodes partly in c++. And of course I might even use your example in real life. Although I don't know any fast algorithms by head to solve this. So perhaps calling a lib like OpenCv is faster. Not sure...
I see that other Node-Red user don't give suggestions for examples. Therefore I select for hardware max7219 led driver example in C++ with call from Node-Red. Later we can use the C++ interface of SQLite for using with Node-Red.
To show the principle of interfacing node-red with C++ a non-hardware problem would be better. Something that can be installed and tested on any node-red system. Even just a Hello World example where the text is generated in C++. The important aspect of your work is how to interface between node-red and C++, not how to interface C++ to some hardware.
The first thing that comes into my mind is to make use of the Node-API of Node js. As far as I can recall, you can create node-api node modules (see previous link) and NR is capable of loading node modules: Writing Functions : Node-RED