Two RS232 terminal projects are presented to you. It has proved advantageous for the authors to use the terminal projects as a starting point for application programs with the serial RS232 interface, in which they are adapted, extended or specialized.
The first project is an extensively tested and fully functional example for the use of Gambas for serial (RS232) communication. The source code is licensed under the Creative Common License and can be adapted as a basis for own applications. The following characteristics characterize the project:
Figure 22.214.171.124.1: Dialog for configuring the serial interface
Figure 126.96.36.199.2: Sending text
The second project is based on project 1 and does without a separate dialog for setting the transfer parameters. It is integrated into the main window. No settings of the serial interface and window positions are saved. There are some enhancements in the functional scope:
Figure 188.8.131.52.3: Sending ASCII text
The source code section for displaying received text is interesting if it is utf8-encoded. The basis of the conversion is the understanding of how characters are encoded in Unicode - with the subset UTF8. The following pages describe this coding in a very understandable way:
The complete source code for both terminal projects can be found in the download area.
The attached project for the long-term measurement of temperatures is a project that has been developed in its current version on the basis of the two presented RS232 terminal projects. The special feature of this project is that control is only possible via the context menu of the tray icon and the temperature values read out can be saved in a log file.