4/6/2022 11:33 AM | |
Joined: 2/23/2022 Last visit: 3/9/2023 Posts: 4 Rating:
|
Hello Bergmanu, this sounds good. Thank you. Best regards |
4/19/2022 2:58 PM | |
Joined: 10/22/2020 Last visit: 7/11/2024 Posts: 169 Rating:
|
Hi all, We have extracted the source files of the NodeRED module from the example image. The folder with the files is attached and we refer here to the following versions of the software used under version 2.2.0 of the SIMATIC Industrial OS. mraa-gpio version
nodejs -v
node-red
Now transfer the folder "node-red-node-intel-gpio" to the IOT2050 to a location of your choice.In the following command line instructions, the folder is located in the home directory. Check at this point that no instance of NodeRED is currently running. Get into your source folder and connect it to your directory for libraries for programming and packages: cd node-red-node-intel-gpio sudo npm link Expected sample output:
Now head to NodeREDs source folder and extend the made link by connecting it now with the newly added module: cd ~/.node-red sudo npm link node-red-node-intel-gpio Expected sample output:
We now have to create a similar link for mraa and the new module by enabling an integration of the library with the following commands: cd /usr/lib/node_modules/mraa sudo npm install sudo npm link cd /home/node-red-node-intel-gpio sudo npm link mraa Expected sample output as shown above. Let’s start NodeRED: if you start it in your autostart routine anyway, a reboot of your IOT2050 is sufficient at this point. Navigate to the editor in a browser and validate the newly added modules. With the following demo flow you can check the function of the mraa implementation in your NodeRED. Here the user LED is addressed and made to blink with a frequency of 1Hz.
Kind regards Attachmentnode-red-node-intel-gpio.zip (555 Downloads) |
This contribution was helpful to
1 thankful Users |
Follow us on