My adventures with a Raspberry Pi and Arduino programming

Archive for November, 2015

Joystick controller and Menu system

I purchased a SparkFun Thumb Joystick and have just gotten around to making it work. Works a treat. Gives two analog outputs – one vertical, one horizontal – and a digital output for the stick being depressed like a button.

I’m now creating a┬álibrary to manage a Menu system using the joystick. The menu system will support 16×2 monochrome parallel LCD screens, like the one I just got working.

The idea being you define different menu levels with options, and child menu items. Selection can be enabled or disabled. Selecting a parent menu item shows the children, moving left and right to highlight an item, depressing the button to select.

This will be a generic menu system that will have inbuilt support for the thumb joystick, but will also allow integration with other input systems.

I’m going to use this on the instructor’s receiver for my D of E group radio tracker project. You’ll be able to monitor multiple teams and use the menu system to show their positions, navigate to them, or view recent status information like location, last report time, distance, speed and so on.

Once I’ve got this working I’ll post a video of an example. Wish me luck!

LCD display working finally

Finally got around to getting my display working. I had thought I had a broken display but turns out that although Arduino analog pins can be configured to be digital pins, that won’t work with standard parallel mode LCD displays. Plugging all 6 pins to digital works fine.

Power usage stats (LCD + Arduino pro mini 3.3V):-

  • LCD backlight, no text – 3.69 mA
  • LCD backlight, 16×2 text – 3.70 mA
  • No LCD backlight, 16×2 text – 0.71 mA

So no prizes for guessing what mode I’ll have it in most of the time! I’ll have it off (no displayed text, no backlight)