Code
Codes for this project are divided into two parts. One is related to the Mbed, and the other is to develop the GUI on the ATOM PC.
Mbed
For the Mbed part, we use the online complier to develop the code. We use the multi-thread to enable to the Mbed to operate several functions at the same time.- The main thread is in the main function, and operates as a PI controller to decide the operation mode and power of the Peltier cooler.
- One thread is to get the desired temperature from the GUI.
- One thread is to get the data from the temperature sensor and send it back to ATOM PC.
- The last thread is to get the speed of the fan.
Source code for Mbed: Mbed code
GUI
In the project we use standard c# form application for user interface, which includes following .NET framework packages:
- zedGraph.dll that simplify data plot in real time.
- Serial Port module establish communication (back and forth) between Mbed and PC
- Speech recognition and speech synthesis unit expands the functionality of this UI.
- Other modules are selected from Toolbox including Push Button, Track Bar, Text Box, etc.
Source code for GUI: GUI code