Skip to main content
Visitor II
July 22, 2020
Solved

Simple Led Blink with STM32CubeMonitor

  • July 22, 2020
  • 3 replies
  • 2353 views

Hello Everyone,

Sorry if this is a stupid question.

I just found this software STM32CubeMonitor and as a starting point I started with a simple LED Blink Example.

In my example there are two variables "led_green_state" and "led_red_state" and the value of these variables changes over a period of time.

I thought to create a dashboard but I am not able to do so.

I didn't find any node which can represent the led on off states on the dashboard.

In order to get familiar with this software do I have to understand about the Node-Red, since CubeMonitor is based on this.

Although the project works with the charts, as I am able to plot these two variables on the chart, but I need to blink leds on the dashboard. Is it possible?

Is there any user manual or tutorial with reference to STM32CubeMonitor, please share.

Thanks, and Regards

    This topic has been closed for replies.
    Best answer by stephane.legargeant

    Hello

    To switch the led color, you must send a msg with a specific payload. By default, the ui_led will turn to green when boolean value true is received, and to red when false is received.

    The subflow "Single Value" in the palette will help you to parse the data : it will extract the value you want to monitor.

    Here is an example :

    0693W000003OoKfQAK.png

    In this example, the Led will monitor the value of variable "g_counterShort".

    • first in the "Single Value" subflow, I set "varfilter" to "g_counterShort" The node will extract the value from processing node message and send only the y value in payload.

    0693W000003OoLTQA0.png

    • Then a "change" node is used to compare the values.

    0693W000003OoLiQAK.png

    The "change" node will send "true" is value is above 0, else it will send "false". You can customize the condition for your need.

    Best regards

    Stephane

    3 replies

    Visitor II
    July 23, 2020

    Dear xpress_embedo,

    There is a wiki available for STM32CubeMonitor :

    https://wiki.st.com/stm32mcu/wiki/STM32CubeMonitor:STM32CubeMonitor_overview

    The "led" node is not available by default in STM32CubeMonitor, but you can add any nodes from node-red community by following this procedure described in the wiki:

    https://wiki.st.com/stm32mcu/wiki/STM32CubeMonitor:How_to_add_external_nodes_in_the_palette

    There are plenty of nodes in the node-red community that can be added to STM32CubeMonitor, but for the "led" one, I would recommend the "node-red-contrib-ui-led".

    Feel free to ask if you have further questions,

    Regards

    Visitor II
    July 24, 2020

    Thanks @Thierry​ 

    I am able to install the mentioned led node using "Manage Pallet" option although it was not there earlier and after following the link you have to given in the above post, I am able to get it.

    But, I am still not able to turn the Led On-Off on the dashboard.

    Reason for this is, I think I have to pare the data, but how I can do that, the chart provided by ST can do this by default.

    Can you please suggest how to do this?

    And what I need to learn to understand this concept.

    0693W000003BGuOQAW.png

    ST Employee
    August 10, 2020

    Hello

    To switch the led color, you must send a msg with a specific payload. By default, the ui_led will turn to green when boolean value true is received, and to red when false is received.

    The subflow "Single Value" in the palette will help you to parse the data : it will extract the value you want to monitor.

    Here is an example :

    0693W000003OoKfQAK.png

    In this example, the Led will monitor the value of variable "g_counterShort".

    • first in the "Single Value" subflow, I set "varfilter" to "g_counterShort" The node will extract the value from processing node message and send only the y value in payload.

    0693W000003OoLTQA0.png

    • Then a "change" node is used to compare the values.

    0693W000003OoLiQAK.png

    The "change" node will send "true" is value is above 0, else it will send "false". You can customize the condition for your need.

    Best regards

    Stephane