mailto: blog -at- heyrick -dot- eu

Tea v0.15

Simple fix for the listing window handling that I broke in version 0.14; when clicking the iconbar icon with the window open wouldn't pop it to the top. Oops.

Download tea_0-15.zip (460.99K)
For RISC OS machines.

 

Android can't keep up with my barcode scanner!

My barcode scanner pretends to be a keyboard. As you scan things, it'll "press" the relevant keys. It's an extremely simple way of entering information. The problem comes when, well, the machine simply isn't able to keep up with the input...

...as astonishing as it seems in 2024, this is my little freebie Android portable when I'm scanning a multipack of Mars bars repeatedly.

Android failing to keep up
Android failing to keep up.

Granted, it is Android Go edition running Google's Sheets app on a rather underpowered machine. But on the other hand, according to Aida64 it's an Allwinner chip with four Cortex-A53 cores clocking up to 1512MHz each. As it is Go edition, it's running them in 32 bit mode. There is also 2GB of RAM.

Compare and contrast RISC OS. A much simpler system made using the design principles of the early '80s (it's basically a port of the BBC MOS) which was bashed into something that can run on machines such as the Raspberry Pi (32 bit versions). Due to its design, it can only use one core, regardless of how many are present in hardware. The Pi 3B+ also uses Cortex-A53 cores, but clocked at a maximum of 1400MHz.

So, essentially the Pi has a slower processor and much older and less capable OS (and let's not even discuss the nightmare that keyboard handling turned in to) and yet it works flawlessly. There's a demonstration of this on my YouTube channel.

To be honest, though, it's not really down to processor speed or operating system complexity. It's down to really crappy keyboard handling and buffering. In 2024 it's inexcusable that something only marginally quicker than a fast typist gets input "lost" in this manner. This isn't an early '80s electronic typewriter (my mom had one that she had to learn to wait for it to catch up!), this is... simply embarrassingly awful.

 

The Larder System

I can waste some time on this today instead of doing something useful like mowing or strimming because it is already getting on to being hot (mid 20s) and is forecast to be a few days of stupid-hot. And, yes, I should be cleaning the kitchen but... #include <random_lame_excuse>

It is starting to take shape. Don't hold your breath, though, as this won't be developed in a hurry. It's not a priority.
Additionally, if I find that putting the shelves side by side along the wall makes it a lot easier to see what I actually have, I might abandon the project entirely. After all, the previous idea was created because the way the shelves were installed made it hard to see what was actually there...

However, the basic plan is to have a Pi and a barcode scanner in the kitchen (and quite possibly networked so the data can be accessed via ShareFS) for entering products into the inventory, and taking them out again. One of the major problems with the previous spreadsheet was how much of a pain in the arse it was to manage. Even if I printed out, crossed through stuff I used, and did a resync of the data with the paper... it was still a pain.

Plus, don't forget that I'm a person with ADHD so if it's not an extremely easy flow then it just won't happen. And, yes, there is a delicious irony in the fact that I'm able to spend weeks developing software to save a few minutes here and there. Unless I get bored of it halfway through and go learn crochet instead... (note not non-ADHD people: this is normal)

Anyway, for a functioning system there are four necessary things:

1. Some sort of computer

I have a Pi 1 around someplace. I have no idea where I put it, but I did find the Pi 1 that I won from David for making another issue of Frobnicate in something that vaguely resembles French. my blog entry and on David's site.
But I don't recommend reading it. If you speak English you'll not get far as it isn't written in English. And if you speak French you'll not get far as it is probably written like Québécoise is spoken. If you're fluent in Franglaise, then this is for you. Enjoy! ☺

2. Some sort of screen

You can buy a little screen with touch sensitivity from Amazon for around fifty euros. They're 1024×600 or 1024×800 and roughly 7" or so. Problem is, it's literally exactly that, a screen. If you want it in a box, that'll double the price.

As it happens, I actually have an old unused screen. It isn't great, but it functions. So instead of buying a new screen, I bought a cheap 30cm HDMI cable...and I've just noticed on the bookshelf that I already have such a cable! Oh well, it only cost €3.

An itty bitty screen
SD card for size.

This screen, apparently, has touch capabilities. Unfortunately it uses the GPIO interface which means that I'd need to find (or write?) a driver plus the header pins are too numerous for the Pi 1 which means I'd need to start modding hardware. So I won't be using touch even if that seemed like an interesting initial idea.

3. Barcode reader

Simplest way to 'recognise' products. Once they're input and known to the system I can simply bleep things. Cost under a tenner, and I already have it.

4. Other input

But unless I want to print out a sheet of custom barcodes to control the system entirely with the barcode scanner, which would be possible but a bit clumsy, there would need to be a relatively easy way to get information into the system without too much fuss.
Primarily it will be for telling it whether I'm entering or removing an item, and for providing use by dates. Which means the important things will be numbers and some symbols.
Now, I cannot reasonably dedicate larder space to a full keyboard. But I don't have to. You can buy a little numeric keypad - that's like the far right side of your keyboard (the number bit) with nothing else attached. Okay, it'll not be easy to add new items that way, but for day to day use it should be more than functional. I ordered a little USB one from Amazon. It and the HDMI cable should be here on Tuesday.

 

And what of software? Well, there's nothing as yet. I haven't even thought much about how to do that. I may design this system "organically" using "agile methodology". That's a fancy way of saying to jack into the network port and just arse around (on the main Pi) until something sort-of functional appears. ☺

At any rate, here are a few mockups that I threw together in a few lines of BASIC. The mockups might look a little odd because I originally made them in the same 480×320 as the screen and then resized them to match the aspect of the display. With a visible area of 75mm by 48mm, it's more like 16:10.

First, the main menu. I won't be using the desktop (no pointer) so it'll be what is capable with a barcode scanner and numeric keypad.

Suggested main menu
Idea of what the main menu might look like.

The time bar at the bottom will depend upon whether or not the device is networked, because if it isn't there won't be any time. But not being networked will make database management (in particular adding new products and backups) difficult. Remember, the Pi 1 only has two USB ports.

If an item is scanned (without giving it a mode by pressing /, +, or -) it will ask what I want to do if the item is recognised. I have not yet thought about what to do if the item is not recognised.

Suggested item scan menu
What might happen upon scanning an item.

Either way, adding an item will eventually arrive here.

Suggested adding item screen
Adding an item.

As the date is entered, using the number keys, the date on-screen will fill in. Press Backspace to correct, or Enter to accept.
Then it will ask how many items to add. Just pressing Enter again will suffice if only adding one. This is so multiple items with the same date can be done quickly.

As a shortcut, if I only enter a year and a month, pressing Enter will set the day to 1. This is to cater for products that give their expiry date as "May 2025" rather than an actual date. It's the same thing I did with the spreadsheet.

At this point, it might be useful to highlight on-screen if items with earlier dates exist. This can remind me to put these new ones behind the earlier ones.

When removing an item, if the item is unique then exactly one will be removed. If the item is not unique, that is to say, differing expiry dates, a prompt will ask which I'm removing.

Suggested removing item screen
Removing a non-unique item.

The "System functions" menu, by the way, is basically a way to do a controlled shutdown and/or reboot when the necessary keys aren't available.

I haven't decided whether or not this will be done in C or BASIC. BASIC is much easier to hack about with, but on the other hand C offers sane memory management and data structures.

For the purposes of these mockups, I have used the system VDU text at 16×16 (double) size, as it was the simplest to work with.
One could always fontify it, in which case it would look like nicer.

Suggested main menu with fonts
Now with added fonts.

It took me way too bloody long to work out how to get sensible results from Font_ScanString to tell me how wide the string was. Okay, I've done it now, but literally that one line of code took me longer than writing the entire rest of the program. FFS.

 

Airwolf season 4

As far as I was aware, there were only ever three seasons of Airwolf. So I was a little surprised to see mentions of a fourth on Legend.

Children of the eighties and their dads will know exactly what this is.

Battle tank with rotors
A battle tank with rotors.

I bet you can hear the theme tune in your head. The show is horrifically dated these days, a lot of things being based on the politics of the time. Plus, we all know that you can't have a supersonic helicopter because, well, physics. But honestly, look at that thing. It's rule of cool given a damn sexy makeover. Unlike it's contemporary Blue Thunder which was like the Volvo of epic helicopters. Then again, I suspect that's what you get when you make over a standard Bell 222 (which is a nice looking machine) rather than trying to make a Gazelle look like a bug-eyed Apache.

So, season four. Where do I begin? Seriously, how can I even start talking about how awful this is. It is sort of like Mission Impossible (the original series, not the Cruise actionfest) meets Walker Texas Ranger with added helicopter and made with a smaller budget than the average wedding catering.
But epic helicopter, right?
Wrong. There is no helicopter.

Yes, you read that right. The series that is based around an arse-kicking helicopter has no helicopter. It is quite obviously a mixture of model shots and footage recycled from earlier seasons. In some cases (like the rising from the lair in the title sequence) it is painfully composited together in a utterly conspicuous way that was probably state of the art in 1987.

Bad compositing
This is so very convincing...

The cast? Completely new. Two guys one girl, and some other regulars. The bad guys? So dumb even the previously mentioned Texas Ranger wouldn't waste his time. Everybody runs around with guns, damn near everybody shoots machine guns from the hip, and... let's not even think about the dialogue.

Lots of gunplay
Reasons not to visit America.

You know how that Robocop TV series was aimed mostly at children (so may have been a bit of a shock watching the original films that inspired the series)? Well, this is a trigger-happy bit of fluff that tries to take itself seriously but has to "develop characters and story" with as little of the eponymous helicopter as possible (to cover over the recycled footage) and... yeah...

Oh, and if you recall back in the day that some of the missiles looked a little bit fake, well thanks to the magic of digital faffery I can show you exactly how fake they were. You'd have to have good eyes as they'd typically be on-screen for only a few frames. The bizarre lines are due to TV interlacing. You're literally looking at a mixture of two frames here, and the solid part is the overlap. But... bright yellow? Obvious much?

What the missiles really were
What those missiles really were.

The production guys would draw this nonsense into the TV frame just before a detonator on the ground was triggered, the end result being "a missile missed the fancy helicopter and hit the ground".

The worst one of all, I cannot take a picture of. Rather like the "rising from the lair" picture above, you don't quite get how bad it is without actual footage to watch. Suffice to say, Airwolf tossed one of its missiles from the pod underneath to blow up the bad guy in an old fashioned airplane. Smash cut to a big explosion that was very clearly set up on some sort of rig on the ground and filmed with the camera tilted up to hide the fact that this wasn't a plane being blown up but just a pyrotechnic effect.

As far as I am concerned, there were only ever three seasons of Airwolf.

 

 

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, 11th August 2024, 12:34
Pity RFID has not become standard, then you could know what is in your larder without scanning it. 
 
There was the checkout free Amazon store, where they used cameras and AI to tell what was in your truck. Story that it was actually people watching who decided what you'd put in your truck. 
 
As I see it you have a choice, build a rotating larder where gubbins can see and scan all the bar codes. Or get "Rick's Larder" to viral as a live stream - where people will inventorise the contents for you "Hey did you see the packet of Guacamole on RL!", "Yeah was fab!". 
jgh, 14th August 2024, 01:02
I was fighting with Font_ScanString some months ago. I got so frustrated that I must have wiped it from my mind - I cannot remember what I was attempting to do with it.

Add a comment (v0.11) [help?] . . . try the comment feed!
Your name
Your email (optional)
Validation Are you real? Please type 81020 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 13:50 on 2024/11/21.

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/11
Return to top of page