Creating a UI on a microcontroller: Part 8

This week I'm back working on my 'rod for my own back' project, ie. making a library to display a useful user interface over the UART of a generic microcontroller.

This week I've started on actually using it for its intended purpose, faking up a retro mainframe computer on ESP8266/ESP32. Trying to refactor my original code for this application to use the library has shown up a few of things.

First I was definitely right to pull out all the code and turn it into a generic library. Secondly it was missing a few features I need but thirdly and most annoyingly it still has lots of bugs.

In particular I had created lots of bugs with redrawing changing items or things that appear, disappear or change frequently. The main application is too complicated to troubleshoot with so I wrote this trivial alarm clock. You set the time and alarm with the +/- under each digit and when they match it turns red, rings the bell and a cancel button appears.

Trivial as this application is, it's really helped with the troubleshooting and I've added a load more functions, one of which changes the title bar of the terminal emulator, if allowed. It's all boilerplate, not fancy algorithms, but I still get a real sense of satisfaction in controlling an AVR Arduino with the mouse and keyboard on the computer it's plugged in to.

Here's a little video of it in action.

1 comment:

Unknown said...

Hi Nick,
Very interesting series of articles, and impresssed with what you have achieved thus far, but other than ' because its there!' not sure where it ultimately going. Perhaps its just computer Chindogu, which is fair enough. What I have been searching for is a SIMPLE UI that is based around the idea of the char LCD screen being emulated on a VT100 terminal ( but with a much larger screen available) and use of keyboard for input. I'm interested in process control, Not really interested in pretty graphics. Such an idea can be fully controlled from the arduino/micro end, and it would be simple for me to add an LCD instead of the terminal. Users may want to put data into their own system such as Excel or bespoke app, I dont want to have a front end system loaded like meguno link for example which I'm sure wont be supported by Win11 Android20 in the future. Ive searche hi and lo and can find nothing, so will probably do my own, but just wonderred as youve already done way more than I would ever want, what your plans are for releasing this?