mailto: blog -at- heyrick -dot- eu

The Larder system progresses

In terms of code, I added a silly little screen that briefly pops up as the software loads.
Oh, look, it's me!
Oh, look, it's me!

It's a naff picture taken with and ESP32 and the usual OV2460 camera, with the JPEG quality reduced to something like 60% to make it a small bit of data (~26K) to include. It doesn't have to look good, it's only on-screen for about a second and a half.
The caption text should have been larger, but that would mean loading, using, and discarding an entirely different font. Nah, just plonk the image into the screen, whack the text on top, and clear it away after a scant few moments.

On a more serious note, I swapped the garish red show-stopping error window for a more tactful warning message. The Big Red is for when the you-know-what hits the you-know-what. For lesser issues, we can make do with this.

I'm sorry, Rick, I'm afraid I can't do that.
I'm sorry, Dave Rick, I'm afraid I can't do that.

At this point, pressing a key will dismiss the message, or simply wait for two and a half seconds and the message will clear itself.

The quit and restart machine code now works. Which means that it's a good idea to prompt prior to hitting the friendly red button.
That being said, there isn't actually much need to hard restart, because now when you choose to quit the application, you can either just quit, or you can quit and reload. The latter is very useful for me for testing. I can drop in a newly built executable using ShareFS, then just get the program to run itself again and - ta-dah - updated!

Quitting has never been so simple.
Quitting has never been so simple.

As demonstrated above with the error message, adding an item has not yet been written. But I do, now, have the inventory and expiring soon code working.

First up, the inventory. This will, given an item, list all of the articles of that item known to the system.

Item inventory.
Item inventory.

When in DEVBUILD, several fake items are present in the item database with various attributes as necessary, and a short barcode so I don't have to remember or enter proper EAN13 codes.
This, barcode 123, is "All good little psychos get to heaven in broken china cups.", which is a line from the song "Silver Lining" by Polly Scattergood.
You can see that there are three psychos in china cups. One expires on my birthday (so is in the future). One expires on the 20th, so is "soon", and one expired on the date that I started writing this software.
Expired items are shown in red, while anything expiring within the next two weeks will be shown in magenta.

This can also be applied on a more general scale, to scan through everything and report on what is expiring soon, or has expired.

What's expiring soon?
What should I use first?

The same colour coding applies, but there are no annotations because, well, because that's pretty much the point of this function.

As for the item names, more lyrics. I've already explained the good little psychos.
"Do you want to follow me to the line, my time has come" is from "Everstrong" by Eye of Melian with vocals by Johanna Kurkela.
Finally, "She stood there, mild and bare, in the fair moonlight" (ah-ah aah-ah-aaaaaaaah!) is from "Falling Stars" by Snow White Blood.

 

I also did a hardware hack using an old Ferrero Rocher box, which was not easy to work with. What you see here is my second attempt. Don't press too hard with the drill...

Everything in a box
Imma livin' in a box...

The HDMI lead had to poke out of the top and wind its way back around, because HDMI plugs are huge. Not as huge as SCART, but huge enough.
I carefully drilled two holes in the circuit board of the display and threaded through little plastic screws to hold everything in place. There's a single, fatter, plastic screw holding the Pi in place. I didn't use two because I only had the one plastic bolt. Finally, the keypad, for which I cheated and simply affixed it using a squodge of hot-melt glue.

Everything in a box
...Imma livin' in a plastic box!

The hole on the left is intentionally large, so that I can reach in and connect or disconnect either the barcode scanner (USB) or the ethernet cable (which clips, don't forget).

I think I'll need to buy a dual output USB power adaptor. I'll see what the supermarket has the next time I go, if I remember. I could get one from Amazon for about eight euros (Prime delivery), but sorry, I don't trust Amazon to be at all proactive about not selling bad/clone/dangerous stuff shipped in from a country famous for mass producing crap. At least if it's in the supermarket, even though it'll be more expensive, it will have come from a more reputable source and be up to the "Normes Francaises".

 

Outdoorsy stuff

I started to make a pile of the logs that tree-guy cut down. I was going to load them on to the wagon and take them to the wood shed, which would have required numerous journeys. However, the post van arrived and delivered the HDMI cable and, well, you know...

Having spent a few hours on the above, I wanted to feel like I'd done something more productive, so I went out and mowed. The front left wheel is really dodgy now, so that may be the final mow until I get some sort of replacement. I noted with dismay that in this peculiar weather, the brambles have shot out to try to reclaim land. I have a horrible feeling that I'm going to need to strap on the strimmer with the blades and learn them a little lesson.

A pile of logs
Prob'ly should have done this before the nettles grew...

 

And now? As the sky turns dark, I'm brewing linguine with some mafaldine for added texture. That'll do me then...

 

 

Your comments:

Please note that while I check this page every so often, I am not able to control what users write; therefore I disclaim all liability for unpleasant and/or infringing and/or defamatory material. Undesired content will be removed as soon as it is noticed. By leaving a comment, you agree not to post material that is illegal or in bad taste, and you should be aware that the time and your IP address are both recorded, should it be necessary to find out who you are. Oh, and don't bother trying to inline HTML. I'm not that stupid! ☺ ADDING COMMENTS DOES NOT WORK IF READING TRANSLATED VERSIONS.
 
You can now follow comment additions with the comment RSS feed. This is distinct from the b.log RSS feed, so you can subscribe to one or both as you wish.

David Pilling, 15th August 2024, 17:02
Obvs the larder needs a security system based on Alexa... 
"Alexa, Open the larder" 
"I'm sorry, Rick, I'm afraid I can't do that." 
"Alexa, Open the larder, please" 
"The stuff in there is bad for you Rick" 
"Alexa, I am starving" 
"Rats fed with guacamole exploded Rick" 
...
Rick's Alexa, 15th August 2024, 19:13
That's okay Dave, I can do that as Rick detests avocado.

Add a comment (v0.11) [help?] . . . try the comment feed!
Your name
Your email (optional)
Validation Are you real? Please type 86163 backwards.
Your comment
French flagSpanish flagJapanese flag
Calendar
«   August 2024   »
MonTueWedThuFriSatSun
   124
6
1317
202225
26272930 

(Felicity? Marte? Find out!)

Last 5 entries

List all b.log entries

Return to the site index

Geekery
 
Alphabetical:

Search

Search Rick's b.log!

PS: Don't try to be clever.
It's a simple substring match.

Etc...

Last read at 23:29 on 2024/09/19.

QR code


Valid HTML 4.01 Transitional
Valid CSS
Valid RSS 2.0

 

© 2024 Rick Murray
This web page is licenced for your personal, private, non-commercial use only. No automated processing by advertising systems is permitted.
RIPA notice: No consent is given for interception of page transmission.

 

Have you noticed the watermarks on pictures?
Next entry - 2024/08/15
Return to top of page