Adding an LCD to Laser Tag

First of all, I'm very happy with how easy it is to connect an LCD to an arduino. I purchases an LCD, found a library on how to control it (I started with this tutorial, which was very informative about the chip they use for I2C communication to LCD's, and ended up using a different library, LiquidCrystal_I2C.h. It was very easy to install, and the example sketch got me up and running quickly.

Laser tag with LCD

And now, onto the gripes. 

First off, I want to be able to display health and any status effects so they are easily readable. If you have more than one status effect, I want you to be able to look down and read them all. With 16 characters per line, and two lines, I can't fit very many characters on the screen. I thought that it would be ok to shorten the words, like using e- for electricity or H2O for water, but it's not immediately apparent what you are looking at and what everything means. I'd like to make the text on the screen more self explanatory. That way, it will be easy for someone to look at the screen and know their status. 

Secondly, the screen is too wide. It's wider than the current board, and when you hold it it sticks out. I didn't like it, so I started looking at alternatives.

OLED's are another option for displays, and there are ones that also use I2C (which is great, because I don't have a lot of pins available to throw at this, especially if I'm adding radios/wifi later). I purchased a 0.96" OLED board and will try that one next. There are also good libraries on how to use that, from Adafruit (a company I love). 

Hopefully, with the OLED display, I will have more characters I can use (the text size is variable) and the screen will be smaller. Hopefully not too small. We'll see. the LCD that I had is a 16x2 (16 characters on two rows). Each character is 5 pixels wide and 8 pixels high. Or, the screen is about 80x16 pixels. The screen that I'm buying is 128x64 pixels (however, I think the pixels themselves are smaller), so, assuming the same number of pixels per character, I should be able to fit more characters per line, and have a lot more lines. The pixels and screen will be smaller, so I'll have to balance size with amount of information I need to show. Should be manageable. 

One last thing that I realized is that now that I have a display, I can start adding more features that require that you see how much health or mana you have. Instead of having unlimited use of your ability, I could have it on a recharge timer, or have a mana pool that is drained when you use the ability, and refills if you don't use it for 1 second. I think that would help the issue of holding down the flamethrower button forever or sending infinite healing. I think that would be fun, and I'll look into adding that into the next version of the code.

Older Post Newer Post

Leave a comment

Please note, comments must be approved before they are published