Proof of Concepts (Tested Use Cases)
In this release, three IOT use cases were provided as a proof of concepts to help developers get started:-
- The 1st use case reads POT values and sends them as JSON messages (via MQTT broker) to a Node-Red instance where the data is displayed on the UI Dashboard. Once messages reaches Node-Red, they could be rerouted to AWS IOT, or persisted to data stores (i.e. ElasticSearch, DynamoDB, & SQLLite3 were demonstrated). Commands to the embedded application could be sent from UI Dashboard (or AWS IOT) via JSON messages routed via MQTT broker.
- the 2nd use case demonstrates controlling and monitoring the state of a MP3 Player from a Node-Red's UI Dashboard; and if ESP8266 (WiFi Module) is attached to STM32F769i, it could be controlled as well via RESTful Web Service (web server) hosted on ESP8266. Also a GUI was built to control the player using uGFX library (based on V2.7 with slight modification) with ST32F746 & STM32F769i boards. CLICK HERE to view a demo.
- the 3rd use case demonstrates reading MPU6050 accelerometer & gyro values and plotting them onto a Node-Red UI Dashboard.
It should be noted; that all three use case:
- were demonstrated using FATFS (w/ SDIO and SPI), ADC; GPT, 5-Button JoyStick, SSD1306 OLED (via I2C), I2S, SAI in a reusable helper modules; that you can include/exclude as you see fit. See ./source folder for details
- could be easily modified/extended to fit other embedded projects.
Click here for High Resolution Diagram in PDF
This architectural diagram for the MP3 Player use case with STM32F769i board. Please pay attention to the sequenced steps; and from there you should be able to trace the system & have a good overview.
Struts4Embedded framework is based on actions & events that are statically predefined for each use case (or project). Those actions & events could be triggered/invoked by sending events to a queue (mailbox), and worker thread(s) consume and execute those predefined actions. This is very similar to the command pattern where the senders and the consumers are decoupled. For more details, pay attention in ./source/ActionEvents folder per each project use case. The core of the architecture is very ease to follow in this file ./source/Struts4Embedded/Threads/ActionEventsThd.c which is under 250 lines of code
The framework was tested using the following development boards: STM32F407 Discovery, STM32F407VET6 Blackboard, Seeed Arch Max 1.1, ST32F746 & STM32F769i discovery boards, STM32F446re-Nucleo, STM32F429zi-Nucleo, & STM32F746zg-Nucleo.
Basically Apache 2.0 has been adopted, therefore please be free to use as you see fit and I shall welcome your critical feedback. I hope this framework will help others in speeding up the development process using a tested & well designed framework. Therefore please be free to use and upgrade as you see fit.
CLICK HERE for Projects Setup