Add Unicorn HD HATs
The main program (TT3) creates an instance of the unicorn module TT_display class which initializes the two Unicorn HD HATs using the unicorn2 library. The unicrn2 library is a modification of the Pimoroni unicorn library. The modification enables the use of two SPI chip select lines.
After initialization, two functions are available, one to update the signal pixels and one to update the fan data (blue pixels in the corner). Fan and signal information is updated asynchronously. The display is updated every 2 seconds if a change has been made. This approach keeps the display current but limits bus activity. There are 512 pixels, each pixel is 3 LEDs (red, green & blue).
By default all 64 signal pixels and the 8 fan pixels are initialized as blue. I am thinking this will help during software development. Any signal not updated is highlighted (remains blue) and it gives me a list of coordinates where the signals should go.
The relative CPU temperature will be displayed with the 5 pixel ladder along the edge. The fan status is displayed by the 3 single pixels. The bottom pixel yellow/green::manual/auto mode. The middle pixel CPU frequency green/yellow::max/lower. The top pixel green/red::on/off.
The graphic above shows the aspect of the 64 signals in the expected state with all the turnouts CLEAR and the locos sitting in the parking lot (4 RED dots center bottom).