recently ST launches STM32CubeMonitor which helps to fine-tune and diagnose STM32 MCU applications at run-time by reading and visualizing their variable in real-time.
STM32CubeMonitor provides a flow-based graphical editor to build custom dashboards simply, and quickly add widgets such as gauges, bar graphs plots. Withnon-intrusive monitoring, STM32CubeMonitor preserves the real-time behavior of applications and perfectly complements traditional debugging tools to perform application profiling.
With remote monitoring and native support for multi-format displays, STM32CubeMonitor enables users to monitor applications across a network, test, multiple devices simultaneously, and perform visualization on various host devices such as PCs, tablets, or mobile phones.
in this project, we will build an interactive GUI read/write with Hexabitz H01R0x LED Module.
First: set up the Monitorin myVariables node I have added 4 variables:
1)mode to switch between ON/OFF mode and Color picker mode
2)intensity_LED to control the intensity of the LED in ON/OFF mode
3)intensity_RGB to control the intensity of the LED in Color picker mode
4)color to choose the color you want in RGB LED.
I have added a slider and dropdown to generate the value (but can be done by any node)
then the “template” node formats the payload and the change node sets the topic.
the template node content :
where address is the address of the variable you want to write to.
type is the type of the variable you want to write to
Here is the value to use and the mapping :
"1": Unsigned 8-bit
"2": Signed 8-bit
"3": Unsigned 16-bit
"4": Signed 16-bit
"5": Unsigned 32-bit
"6": Signed 32-bit
"9": float
"10": Double
value from the input will be inserted in the template. which means it will get its value from the slider or dropdown values or even button...etc.
The next node is a “change” to set the topic to write
Dashboard:
In order to modify your layout:
1)you need to click on the Dashboard menu, on the top right side,
2) select the layout and edit the layout as shown below
Then you can move the elements the way you want
in theme,you can change the background color and change button color...etc.
in H01R0x Module the only code you have to write is as follows,
void ExecuteMonitor(void) {
if (mode != 0) {
if (mode == 1)
RGB_LED_on(intensity_LED);
else if (mode == 2)
RGB_LED_setColor(color, intensity_RGB);
else if (mode == 3)
RGB_LED_off();
}
Delay_ms(100);
}
Second: Hardware setupyou need to connect ST-Link to H01R0x module by SWD(serial wire debugger), and power module 3.3V
Comments
Please log in or sign up to comment.