The primary user interface is implemented in python 3 and targets a 240x240 color LCD for output and four buttons as well as a four direction joystick with another button as user input. It's a simple state machine that interacts with the musikcube api running on the same device. at the end of each state, the display's framebuffer is updated before moving to the next state (which could be the same as the currrent state).
the 20 uppermost pixel rows are used for battery state, current time, total time.
the 20 lowermost pixel rows are used for 16 pixel tall marquee-style character output of artist/album/track information.
the 20 leftmost pixel columns are currently unused.
the 20 rightmost pixel columns are used for function indicators for the three buttons.
the remaining 200x200 pixel frame is used by track artwork, scrolling menus, etc.
A simple timer is started upon initialization that will flag a state to turn off the display after two minutes (by default) with no user interaction to conserve energy and display lifetime. The timer is reset to zero with any button pushes.
if display is off, it will not turn on unless the joystick button (by default) is pressed, to minimize inadvertent waking while in pocket.
a websocket (ugh) connection to the backend musikcube process that will actually be playing back the audio and maintaining the library database, queue, etc. we will simply be controlling playback and querying the library via api messages sent over the websocket connection. artwork can be fetched via http requests based on thumbnail_id metadata.