Here is another example demonstrating FreeRTOS capabilities for NXP Rapid-IoT and how to display menus using the ui manager module.
(please find the attached code below)
Note: This is an advanced example and requires C code programming skills as well as some background in real-time system programming.
For more information about FreeRTOS see the API reference guide.
This example demonstrates how to use basic multi-task features in order to handle a multi-screen environment application.
In this example you will find three screens:
Welcome Screen
(T3 / Top Touch)
Temperature screen
(T2 / Right Touch)
Humidity screen
(T4 / Left Touch)
Four tasks are created :
Screens are described in an object-oriented manner to easily manage them in the task's code:
.navigation describe how the menu transition will behave
.title & .image will be used to display correct information
.start/stopTaskFunction will be used to create/pause the according measurement&display task.
example_1b.h
static guiScreen_t gui_example1b_mainScreen = { .navigation = { .up = NULL, .down = NULL, .left = &gui_example1b_humScreen, .right = &gui_example1b_tempScreen }, .title = "Welcome !", .image = nxp_logo, .startTaskFunction = &gui_example1b_mainScreen_StartTask, .stopTaskFunction = &gui_example1b_mainScreen_StopTask };
- example_1b.c/h
- main.c (main_task entry point l.272)
- ui_manager.c/h
- Import project(s) from file system...
- Choose archive, then select the downloaded archive
Please, feel free to take a deep look into the code, tinker and develop your own application.
Don't hesitate to share with us any questions/remarks you may have.
Hi,
Thanks for the example code. I tried creating a thread network from rapid iot board and add a KW 41Z board to it. I have configured pskd, network name and channel to similar in both boards.
But KW41Z is not able to join the network. It is showing "Join Failed".
At the same time I am able to establish a thread network between two KW41Z boards. Any pointers on this would be highly helpful.
Thanks and Regards
Niranjan
This is wotrh opening a new topic with more details on your Rapid-IoT thread network configuration.
Regards,
Sure. I will go ahead and try a few more time before creating a new thread.
Thank you.
Regards
Niranjan
Hello,
This FreeRTOS code has been proved in Thread programs like "router_eligible_device_freertos" from FRDM-KW41Z? What IoT communication is using your freeRTOS program?
Regards,
Diego Comin
In this K64F example, there is no Thread or BLE connection initialized. The scope of this project was to demonstrate FreeRTOS API and features in order to build a custom GUI.
Nevertheless, the KW41Z is running, by default, a hybrid black-box application that can run either Thread or BLE communication. It is available in KW41Z SDK:
SDK_2.2_RapidIoT_MKW41Z4\boards\rpk_kw41z\rapid_iot_apps\rpk_kw41z_hybrid
You will need, to enable this feature, to initiate FSCI command on k64f with kw41. Sources and API for that are already included in the project: framework/FSCI
You can take a look at some already developed applications on online IDE: "Out of Box", "Weather Station", ...
Regards,