top of page

Food Inventory

[July 2023]

Have you ever thrown food away cuz it expired in the fridge? Or overbought groceries cuz you can't remember what you have in the fridge? Introducing this bad boi, who'll 
1) inform you when a food is close to expiration

2) also manages fridge inventory, which will be uploaded to a webserver where you can check on-the-go (especially during grocery shopping)

Scan & expiry predict functionality

(Apple has an Easter Egg for expiry date. Bonus if you know what that date is :) )

Manual Entry

IMG_2925.PNG

Web server 

Inventory Matters:

1) Food item class, where each food item will be added as an object,

2) which will be utilized by an Inventory Manager Class (Singleton instance, so that there can be no other inventory manager)

3) The inventory manager runs an algorithm to sort the inventory by earliest expiry at the top (bonus points if you know which sorting algo is ran here)

GUI Matters:

Ran the Touchscreen LCD on a MCU with only a 8 MHz SPI, to test some GUI theories, since any lag will be super apparent on a 8MHz SPI, especially when its running a touch UI at a relatively high resolution of 320 * 460 on  a 4.5 inch display.

Top and bottom UI managed via separate state machines, where active actions / event triggers changes states.

Divided the UI into 2 separate sections, Top where it displays a dynamic inventory (that sorts the item via their expiry dates), and bottom where it displays a dynamic UI. 

Separate base classes are created for this, and the GUI driver also check if there is a need to update these portions within the class objects. 

Found that this reduces GUI processing time since they're not unnecessarily updating their portions if theres no changes. You can observe this when the page advances, where the LCD driver does not squander precious processing on refreshing the top portion.

2) Created classes for the touch buttons, so that its easy to create any amount of button objects (especially handy when creating the touch keyboard).

3) Had a LED strip running a LED animation as well. This is an extremely good test of concurrency. If the UI functions were not written well, they will block the LED strip from running smoothly.

IMG_2722.jpeg
IMG_2080.jpeg
IMG_2107.jpeg
IMG_2195.jpeg
IMG_2102.jpeg
IMG_2161.jpeg
bottom of page