Now that I have my display working with Micropython, I need to find something else to tinker with. Micropython has interrupts and callbacks, so I have been looking at that. I have a preliminary software version that uses interrupts, so here we go!
I just did my very first Pull Request to an Open Source project! This is a request to a project maintainer to merge changes I have made into the master branch of the project.
I added a single parameter, which defaults to zero, for the number of decimal places. I also want to add an optional rounding capability, which will require one more parameter.
I am still doing some really close testing of the display.number() routine, but it is looking very good so far. It works way better than it did before I got to it, and it handles decimal and integer numbers correctly.
I did not have to debug down to the level I thought I would have to go. The problem was in the display.number() routine. I fixed that and also improved the routine to handle integers *or* floats. It was just doing floats before. Another improvement soon…
Today's debugging session will consist of figuring out if I can poke at device(s) on the I2C bus from the REPL. I was going to write that I have never tinkered with I2C at the bus level, but that would have been wrong. I actually did that once.