Rick's b.log - 2024/08/14 |
|
It is the 18th of December 2024 You are 18.219.103.10, pleased to meet you! |
|
mailto:
blog -at- heyrick -dot- eu
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.
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.
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.
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.
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 can also be applied on a more general scale, to scan through everything and report on what is expiring soon, or has expired.
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.
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...
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.
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".
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.
And now? As the sky turns dark, I'm brewing linguine with some mafaldine for added texture. That'll do me then...
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!
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.
I'm sorry, Dave Rick, I'm afraid I can't do that.
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.
Item inventory.
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.
What should I use first?
"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.
Imma livin' in a box...
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.
...Imma livin' in a plastic box!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...
Prob'ly should have done this before the nettles grew...
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.
© 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. |