Mathias Wilhelm's review about LCD shield

Mathias Wilhelm's review about LCD shield

Firstly we want to give a big thank you to Mathias Wilhelm. You are a really remarkable engineer and reviewer, having helped us complete several well-received reviews, including Mathias Wilhelm’s Review About Octopus 9DOF Module  , A Review About RGB Matrix Shield , A Review About Freaduino And Redboard From Sparkfun . No words can express our sincere gratitude, and benefiting from the sharing of your effort to the hobbyists in the open hardware community, more electronics enthusiasts are now willing to perform product test for us. As long as you meet our requirements for the reviewer, please feel free to contact us. Now let's take a squint of today's sharing, Mathias Wilhelm's review about LCD shield So a standard 16x2 LCD in blue - so what? Well on a closer look, there are three elements that turn this LCD shield into a remarkable and useful tool:

1.there is a rotary encoder
2.there is a 5-way digital joystick
3.A1-A5 and D11,D12 and D13 are available with GND and V+

Rotary Encoder

The encoder uses pins D2 and D3 and be used like any other rotary encoder. D2 is used a triggering interrupt and the level of D3 determines if you are turning clock- or counterclockwise.

5-way digital joystick

The joystick uses A0 as analog input and gives the joystick value as a voltage between 0 and 5V. It uses a resistor based voltage divider. This is also the very common way to handle such a joystick.

LCD Pins

The pins D4 to D10 are used for managing the LCD. D10 is controlling the brightness of the LCD. As D10 is a PWM output, writing to it with analogWrite will dim the brightness. A Value of 0 turns the backlight off, the value of 255 turns it completely on.

Unused Pins

In my eyes, the biggest advantage of this shield is that the usused pins are made available via a set of male pins with GND and V+ provided for each pin. This allows me to connect sensors to A1-A5 as well as I2C devices through A4/A5. D0 and D1 are not used as well so serial output is possible without restrictions. I connected a servo to D11 (PWM pin) and used the demo sketch to drive the servo using the rotary encoder and print the encoder setting on the LCD. Within minutes you have a servo tester that gives you the angle response of your servo.

Extended Demo Sketch
So finally I thought I check how far I can go with this LCD shield: I combined the demo sketch of the LCD shield with my extended demo of the Octopus 9DOF breakout. I had to modify the output of the Oactopus data and realised how tough it is to live with 16x2 characters ...

   

I added code to switch through a menu using the joystick and needed to write some "debouncing" code so that the joystick controlls the menu items the right way:
at start, the LCD displays the startup tests
by default, the ADXL reading is shown
using the joystick left/righ switches between ADXL, HMC and ITG sensor
using the joystick up/down switches to servo tester and brightness control
When writing the code I realized that the Servo library blocks the timer1 making PWM output impossible on other pins like D10 for brightness control. The servo command detach() should set the timer1 back to support PWM but it loks like the code is not working correctly. So I inserted a small routine to reinitialize the timer.

Short Circuit Danger
The soldering pins of the LCD reach into the area where the USB connector is located. Make sure you have the USB plug insulated.

Summary
This is the best LCD shield I know so far. The rotary encoder, the joystick and the access to the unused pins make this shield extremely valuable compared to other shields. So not just another LCD shield!

Demo Code
The Demo Code is available here.