Tag Archive | "joystick"

Kit Review – Snootlab DeuLigne LCD Arduino Shield

Hello everyone

Another month and time for another kit review 🙂 Once again we have another kit from the team at Snootlab in France – their DeuLigne LCD Arduino shield. Apart from having a two row, sixteen character backlit LCD there is also a five-way joystick (up, down, left, right and enter) which is useful for data entry and so on.

This LCD shield is different to any others I have seen on the market as it uses the I2C bus for interface with the LCD screen – thereby not using any digital pins at all. The interfacing is taken care of by a Microchip MCP23008 8-bit port expander IC, and Snootlab have written a custom LCD library which makes using the LCD very simple. Furthermore the joystick uses the analog input method, using analogue pin zero. But for now, let’s examine construction.

Please note that the kit assembled in this article is a version 1.0, however the shield is now at version 1.1. Construction is very easy, starting with the visual and easy to follow instructions (download). The authors really have made an effort to write simple, easy to follow instructions. The kit arrives as expected, in a reusable anti-static pouch:

As always everything was included, including stacking headers for Arduino. It’s great to see them included, as some other companies that should know better sometimes don’t. (Do you hear me Sparkfun?)

The PCB is solid and fabricated very nicely – the silk screen is very descriptive, and the PCB is 1.7mm thick. The joystick is surface-mounted and already fitted. Here’s the top:

… and the bottom:

Using a Freetronics EtherTen as a reference,  you can see that the DeuLigne PCB is somewhat larger than the standard Arduino shield:

The first components to solder in are the resistors:

… followed by the transistor and MCP23008. Do not use an IC socket, as this will block the LCD from seating properly…

After fitting the capacitor, contrast trimpot, LCD header pins and stacking sockets the next step is to bolt in the LCD with the standoffs:

The plastic bolts can be trimmed easily, and then glued to the nuts to stay tight. Or you can just melt them together with the barrel of your soldering iron 🙂 Finally you can solder in the LCD data pins and the shield is finished:

The only thing that concerned me was the limited space between LCD pins twelve~sixteen and the stacking header sockets. It may be preferable to solder the stacking sockets last to avoid possibly melting them when soldering the LCD. Otherwise everything was simple and construction took just under twenty minutes.

Now to get the shield working. Download and install the DeuLigne Arduino library, and then you can test your shield with the included examples. The LCD contrast can be adjusted with the trimpot between the joystick and the reset button. Note that this shield is fully Open Hardware compliant, and all the design files and so on are available from the ‘download’ tab of the shield product page.

Initialising the LCD requires the following code before void Setup():

Then in void Setup():

Now you can make use of the various LCD functions, including:

Reading the joystick position is easy, the function

returns an integer to pos representing the position. Right = 0, left = 3, up = 1, down = 2, enter = 4. Automatic text scrolling can be turned on and off with:

Creating custom characters isn’t that difficult. Each character consists of eight rows of five pixels. Create your character inside a byte array, such as:

There is an excellent tool to create these bytes here. Then allocate the custom character to a position number (0~7) using:

Then to display the custom character, just use:

And the resulting character filling the display:

Now for an example sketch to put it all together. Using my modified Freetronics board with a DS1307 real-time clock IC, we have a simple clock that can be set by using the shield’s joystick. For a refresher on the clock please read this tutorial. And for the sketch:

As you can see, the last delay statement is for 400 milliseconds. Due to the extra overhead required by using I2C on top of the LCD library, it slows down the refresh rate a little. Moving forward, a demonstration video:

So there you have it. Another useful, fun and interesting Arduino shield kit to build and enjoy. Although it is no secret I like Snootlab products, it is a just sentiment. The quality of the kit is first rate, and the instructions and support exists from the designers. So if you need an LCD shield, consider this one.

For support, visit the Snootlab website and customer forum in French (use Google Translate). However as noted previously the team at Snootlab converse in excellent English and have been easy to contact via email if you have any questions. Snootlab products including the Snootlab DeuLigne are available directly from their website. High-resolution images available on flickr.

So have fun and keep checking into tronixstuff.com. Why not follow things on twitter, Google+, subscribe  for email updates or RSS using the links on the right-hand column, or join our Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other –  and we can all learn something.

[Disclaimer – the products reviewed in this article are promotional considerations made available by Snootlab]

Posted in arduino, DeuLigne, I2C, kit review, LCD, snootlab, tutorialComments (2)

Kit review – nootropic design Hackvision

Hello readers

Time for another kit review – the nootropics design Hackvision,  a nice change from test equipment. The purpose of the Hackvision is to allow the user to create retro-style arcade games and so on that can be played on a monitor or television set with analogue video input. Although the display resolution is only 128 by 96 pixels, this is enough to get some interesting action happening. Frankly I didn’t think the Arduino hardware environment alone was capable of this, so the Hackvision was a pleasant surprise.

Assembly is quick and relatively simple, the instructions are online and easy to follow. All the parts required are included:


The microcontroller is pre-loaded with two games so you can start playing once construction has finished. However you will need a 5V FTDI cable if you wish to upload new games as the board does not have a USB interface. The board is laid out very clearly, and with the excellent silk-screen and your eyes open construction will be painless. Note that you don’t need to install R4 unless necessary, and if your TV system is PAL add the link which is between the RCA sockets. Speaking of which, when soldering them in, bend down the legs to lock them in before soldering, as such:

Doing so will keep them nicely flush with the PCB whilst soldering. Once finished you should have something like this:


All there is to do now is click the button covers into place, plug in your video and audio RCA leads to a monitor, insert nine volts of DC power, and go:


Nice one. For the minimalist users out there, be careful if playing games as the solder on the rear of the PCB can be quite sharp. Included with the kit is some adhesive rubber matting to attach to the underside to smooth everything off nicely. However only fit this once you have totally finished with soldering and modifying the board, otherwise it could prove difficult to remove neatly later on. Time to play some gamesin the following video you can see how poor my reflexes are when playing Pong and Space Invaders:

[ … the Hackvision also generates sounds, however my cheap $10 video capture dongle from eBay didn’t come through with the audio … ]

Well that takes me back. There are some more contemporary games and demonstration code available on the Hackvision games web page. For the more involved Hackvision gamer, there are points on the PCB to attach your own hand-held controls such as paddles, nunchuks and so on. There is a simple tutorial on how to make your own paddles here.

Those who have been paying attention will have noticed that although the Hackvision PCB is not the standard Arduino Duemilanove-compatible layout, all the electronics are there. Apart from I/O pins used by the game buttons, you have a normal Arduino-style board with video and audio out. This opens up a whole world of possibilities with regards to the display of data in your own Arduino sketches (software). From a power supply perspective, note that the regulator is a 78L05 which is only good for 100mA of current, and the board itself uses around 25mA.

To control the video output, you will need to download and install the hackvision-version arduino-tvout library. Note that this library is slightly different to the generic arduino-tvout library with regards to function definitions and parameters. To make use of the included buttons easier, there is also the controllers library. Here is a simple, relatively self-explanatory sketch that demonstrates some uses of the tvout functions:

And the resulting video demonstration:

I will be the first to admit that my imagination is lacking some days. However with the sketch above hopefully you can get a grip on how the functions work. But there are some very good game implementations out there, as listed on the Hackvision games page. After spending some time with this kit, I feel that there is a lack of documentation that is easy to get into. Sure, having some great games published is good but some beginners’ tutorials would be nice as well. However if you have the time and the inclination, there is much that could be done. In the meanwhile you can do your own sleuthing with regards to the functions by examining the TVout.cpp file in the Hackvision tvout library folder.

For further questions about the Hackvision contact nootropic design or perhaps post on their forum. However the Hackvision has a lot of potential and is an interesting extension of the Arduino-based hardware universe – another way to send data to video monitors and televisions, and play some fun games.If you are looking for a shield-based video output device, perhaps consider the Batsocks Tellymate.

As always, thank you for reading and I look forward to your comments and so on. Furthermore, don’t be shy in pointing out errors or places that could use improvement. Please subscribe using one of the methods at the top-right of this web page to receive updates on new posts, follow me on twitter or facebook, or join our Google Group for further discussion.

High resolution images are available on flickr.

[Note – The kit was purchased by myself personally and reviewed without notifying the manufacturer or retailer]

Posted in arduino, games, hackvision, kit review, LCD, microcontrollers, notropicsComments (2)

Part review – Sparkfun Thumb Joystick

Hello readers

Today we examine an inexpensive yet fascinating little input device – the thumb joystick. Many people would recognise this as similar to the joystick in various types of gaming consoles, and they would be right. Let’s have a look:


In the image above the joystick has been soldered into the matching breakout board. Unless you are making your own PCBs, you will want the breakout board:


The joystick consists of two 10k variable resistors, spring-loaded with centre return; also a SPST button that is activated by pushing down on the joystick:


In order to use this joystick, we need an idea of the values that it can return. I have done this in three ways:

First of all, I connected a multimeter and measured the resistance of each axis. For the vertical axis, dead centre was 3.77k ohms, maximum up was 4.7k, with a maximum of 5.9k between centre and maximum – very odd. The vertical minimum was 83 ohms. For the horizontal, dead centre was  around 3.73k ohms, full left was 4.78k, via 5.38k; full right was 180 ohms without any odd high values in between. However, those values didn’t feel right.

Secondly,  I have recorded a visual representation of the horizontal and vertical axes’ effect on the supply voltage, using my little oscilloscope. With regards to the following two video clips, the supply voltage is 5V; the ‘scope display is set to 1V/division, with 0V at the bottom of the screen.

The horizontal axis:

and the vertical axis:

Finally, I connected the horizontal and vertical output to  analog inputs on my Arduino, and used analogRead() to see how the joystick returned analogRead() values. The following video clip demonstrates this using an LCD to display the values. Furthermore, here is the sketch used for the following demonstration: demo sketch.pdf

It would seem that there is a lot of ‘dead area’… postions where there is no change in reading, where one would assume there to be a change. Again, this can be programmed out in your sketch by a little calibration and measurement.

Now we know what values it returns, we can start to understand how to control things. When it comes to use the joystick in your own projects, it would pay to recreate a measurement circuit and note down the values your joystick returns; in order to be able to calibrate your software to use the joystick appropriately you may need to compensate for the hardware irregularities of the joystick.

Overall however, it is an interesting and easy product to integrate into your projects. This post today is just an introduction, later on the joysticks will be used in other projects and so on. High resolution photos are available on flickr. And if you enjoy my tutorials, or want to introduce someone else to the interesting world of Arduino – check out my new book “Arduino Workshop” from No Starch Press.

In the meanwhile have fun and keep checking into tronixstuff.com. Why not follow things on twitter, Google+, subscribe  for email updates or RSS using the links on the right-hand column? And join our friendly Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other –  and we can all learn something.

Posted in arduino, BOB-09110, COM-09032, lesson, part review, thumb joystick, tutorialComments (11)

Subscribe via email

Receive notifications of new posts by email.

The Arduino Book

Arduino Workshop

FĂĽr unsere deutschen Freunde

Dla naszych polskich przyjaciół ...

Australian Electronics!

Buy and support Silicon Chip - Australia's only Electronics Magazine.

Use of our content…

%d bloggers like this: