This week, I was having a discussion with my other half about football and money and the subject came round to betting. Whenever he goes to the match his mates all chip in a few quid and they put a bet on. The bet is usually the final score AND either the first or last goal scorer. Needless to say they never win any money.
We realised that while it is possible to have small windfalls through betting, it is so random, and obviously so stacked against you, otherwise how would bookmakers earn a living, that the amount you have to spend cumulatively far outweighs the amount you might win.
We decided to make that money work for us instead – we will enjoy the excitement of a bet while saving money.
Uh-oh! I feel a maker project coming on… Introducing Ralph & Edna’s Fixed Odds Betting Shop (named after Edna Cross and Ralph Hardwick from Brookside – they loved having a cheeky little bet)!
Both of us will place a £10 bet on a randomly generated final score AND first or last goalscorer. If either of us win, we win £20. If we lose the money goes into a savings box. At the end of the football season we’ll use whatever we have to go on holiday or something. There’s still a small chance one of us will win some money each week, but the house definitely wins most of the time – just in our case the house is ours so we win either way!
Ultimately I want to make a money box that represents the house/betting shop. But I want to include a button that, when pressed, will display the random bet each of us is making.
I’m imagining this will use a Raspberry Pi or Arduino (depending on what we have lying around the makerspace that I can test on) and a 16 character, 2 line LCD screen.
For now though I’ve created a python script that will generate the bet for me.
I initially followed a tutorial for a magic 8 ball (be careful though if you’re trying it – this code is for python 2 but my laptop uses python 3 so there are a few discrepancies in the tutorial namely raw_input has been replaced by input and print now requires parentheses)
I noticed the random module was appearing a lot in the various forums and comments so I had a read about that here
It took a few attempts but eventually I came up with a bit of code (see featured image) which, miraculously worked for me.
Here’s the bets it generated…
Now I just need to learn how to run it from a button press and output it to the LCD screen and I’ll have my bet generator gadget!