Classes > Interface and application programming
For this assignment I wanted to program my application using small and simple libraries, so I decided to use SDL for the user interface and libftdi for serial communication, all from C.
So I wrote a simple event-based loop. SDL is often used to program videogames, so I used a similar approach. A loop that waits for user events and renders the scene. My user events are just reading the keyboard to quit the application, it's in the render function where the action happens. It tries to read data from the FTDI (with fallback in case of error), and creates the graphics and text based on the data read.
Here you can see an screenshot of the application running, reading noise from an arduino ADC:
Then I added code to my "input devices" project to send the temperature using the UART. Here the output of the ds1624 sensor after being heated up with a hot-air soldering station:
Code for the application:
Code for the MSP430g2553:
For this assignment, I started to design some of the electronics of my final project, the mainboard of the system, with the microcontroller, voltage regulator and headers to connect the subsystems: