Bike GPS LCD

Continuing on from my last post some progress has been made.

To use my LCDs while keeping the wiring minimal I ordered a few of these I2C adapter boards. These simply connect to the 20 pins on the LCD and allow you to attach the LCD to another device using only 4 wires which keeps your IO pins free for other devices and massively simplifies wiring.

Thanks a lot to Nick Gammon, the process of using KS0108 LCDs with MCP23017 I2C expanders is quite simple.

With this information and the I2C boards arriving I had a shot at getting it all working. After soldering on the board and flashing the example project file I hit an issue.

Arduino lcd issue

There seems to be an issue when drawing past the middle of the screen and everything goes wrong from there. I assume there is an issue with the soldering here but as I have 2 LCDs I decided to try again on a new one and fix this one later.

Arduino LCD working

Now this is a bit better!

Now I want to lay out the screen with some info like speed and distance, As I don’t have a GPS module yet, this info will be faked. I wanted to have this screen vertical but that would require modifying the function for drawing letters and it would slow down rendering letters, requiring 8 reads and 8 writes per char vs the current 5 writes. This is because of how writes are done on this LCD, more details can be seen in Nick’s post above. So for now I will keep the screen horizontal.

example UI

I made a little example UI of how things could be set out but this will be refined a lot. Example source code.

Summery

Whats next: Now that I have the LCD working the next thing I want to do is write some code that allows displaying big digits on the screen for easy readability.

Challenges

Things to do different next time