Skip to main content

Posts

Showing posts from November, 2020

Serial Monitor

 Overview I've started to learn C# to make mobile apps with Xamarin forms for controlling some of my electronics projects. To familiarize myself with the syntax and idiosyncrasies of C# I decided to make a basic serial monitor desktop app using Windows Forms. I basically modelled it of the serial monitor included in the Arduino ide, and tried to add small improvements where possible. Code Main steps Layout the GUI Establish serial reading Establish serial writing Improve UX GUI Layout In the past I've made small GUI programs with python and tkinter, so using the Windows Forms design editor was a welcome change. It was very easy to get a basic interface up and running without having to delve too deeply into the code. It was very much a case of dragging and dropping the relevant parts onto the window in the designer and attaching callback function to the relevant events. Serial communication The C#  serial port library is pretty simple and easy to use. All it needs is a COM port...