My Raspberry Pi powered betting generator hit a bit of a roadblock today. I found a batch of LCD1202 screens and wired one up to the Pi. I found a whole load of tutorials and set up guides for using this screen with a Raspi and python, but no matter how many I tried, I could not get the screen to display anything. The contrast was fine, sometimes it would display a random collection of characters but never what was being generated by the script.

On the second day of piscreen adventures, I learned how to SSH into the Raspi from my laptop because I was finding it difficult to type in code on the Raspi while reading the code on my laptop, the monitor I was using was small and blurry, it wasn’t a fun experience. Still accessing the pi remotely made me feel like some kind of hacker which kept me amused for longer than it should have. Needless to say though, eventually the persistent failure of the screen to play with the Raspi was making me particularly frustrated.

During my travels around the web I found a whole load of tutorials for Arduino too, so I dismantled the Pi and wired up the Arduino instead. Once I got the Arduino IDE installed I found the LiquidCrystal example and sent it to the board… guess what? it worked first time. The LCD screen mocked me with its Hello World and a number displaying how many seconds since the code ran.

Ok so at least we know the screen works.

But my bet generator is written in Python and I do not know C at all. In fact, I was so reluctant to try recreating it in C that I RETURNED TO THE PI.

My head is in my hands even now, wondering why on earth I wasted a further few hours trying to make the pi work.

Eventually, I gave up and decided it was time to at least investigate C. Starting with the standard Hello World and jumping right on up to creating a betting generator. I found a script for creating a random sentence generator and, I suppose, I hacked it 🙂 There was a lot of false starts and errors but eventually it compiled and ran.

The results of the bets are here:

And I’ve already assembled the Arduino, so now I just need to work out how to push the results to the LCD screen instead of the console.