Raspberry Pi – Part 2

This is the main menu interface of our user interface, displayed on the touchscreen.

To add the time input, at first we added sliders (again) similar to those for pill quantity of each pill. However, it is very tedious to use; the hour slider range is from 0 to 12, while the minutes slider range is from 0 to 59. Such small divisions may be very difficult to work with, especially for the elderly/

The code is such that the hour slider input is multiplied by 100 and added to the minute slider input. It would work to display 1030 when hour input = 10 and minute input = 30 (10*100 + 30 = 1030), but it is impossible to display 0000; when hour input = 0 and minute input = 0, the display will simply show 0 in the time column, which is not in a recognized 24h format. This may confuse users.

Therefore, we changed the time input to use the spin element in pysimpleGUI instead of the slider element. Users can change the individual digits rather than just hours or minutes.

The weighted summation of each of the 4 digits (i.e. for 1030, 1*1000 + 0*100 + 3*10 + 0 = 1030; for 0000, 0*1000 + 0*100 + 0*10 + 0 = 0) is still stored in a hidden column between ‘Pill C’ and ‘Time’ columns and the values there are sent to the Arduino Mega as a 24h format time, but the time displayed in the ‘Time’ column is an array (integer, integer, ‘:’, integer, integer), so it is a recognizable time format shown to the user on the main menu screen.

We ensured that the pop-ups with the various error / confirmation messages are of sufficiently big font size for the elderly to read as well.

Leave a Reply

Your email address will not be published. Required fields are marked *