Sunday, August 29, 2021

Software updates ongoing

Often my Airball posts are about building hardware. This one is about pure software -- but it has deep hardware implications.

You may recall that the Airball displays have a knob and/or buttons to adjust parameters. Well, we only need adjustment very infrequently. In particular, we only "need" on-device interactors for:

  1. Entering the barometer setting, if the altimeter is being used; and
  2. Changing the screen brightness.
My current test strategy is to hold off on the altimeter for a while and get feedback about the basic device, and the cheap commodity RasPi displays often don't allow software control of brightness and are inadequately bright anyway!

The new scheme is to host a Web app on the device, which will allow the user to edit parameters from their phone or tablet. The user will connect to the Wi-Fi network of the probe and display, go to a well-known IP address, and edit to their heart's content. Since I can use React or Flutter or whatever I want to build this app, I can create a "real" UI.

The first step is the wiring on the device. I changed the code so the airball-settings.json file is in engineering units (not button counts like I had before), and also made a lot of display parameters (like width, height, and whether various widgets are shown) variable at runtime. I added code to use inotify to listen for changes in the settings file, and created a simple CGI script in Python using Apache2 to handle POSTs to change the file.

The result is a super-simple Wi-Fi enabled settings UI, which I'm demonstrating here by editing the file and POSTing it via curl to the device:

I am using a UCTRONICS 3.5 inch display as opposed to the 4.3 inch displays I was using previously -- in an attempt to create a somewhat more compact unit. We'll see what feedback we get from users.

Next up is to create the Web app -- React and Flutter are the main competitors, and I'm leaning towards Flutter just because I want to learn it!

No comments :

Post a Comment