Close

Making them talk: Arduino Side

A project log for LCD display for a HP G7 Microserver

My father has this fileserver that is not connected to a monitor, so I decided to put a small LCD display to display useful info

abraham-limpoAbraham Limpo 09/13/2023 at 21:110 Comments

My original plan was to use LCDPROC, and being an old library, there was a high chance someone already did the work for me. And lo and behold, there was! In this particular case some chap from turkey already implemented something similar back in 2011, and in his Github Repo it had a sample INO project i could fork. 

His project is essentially an expansion of SerialDisplay example for the LiquidCrystal arduino library, but adding some niceties like the ability to send commands, and a nice "disconnected for x time" counter.*

The only thing it lacked was some way to read the buttons and communicate them to the user. I opted for sending A and B in response for button presses. The system does not support keyup or keydown, only keypress, but could be easily modified to do that if needed. It also lacks any kind of real debouncing.

Also, the disconnection counter has an amusing bug that I did not bother to fix. As it uses an int to get the seconds, is way too easy to overflow if you leave the LCD plugged in without the software for too long. I'm guessing I could change them to uint32_t as the timeoutCounter and lastTimeReception variables and that would fix the bug.

In any case, for the purposes of what I needed this was enough, and I can always go back and improve it.

Discussions