Argon One Mini Computer: first build

Father Christmas delivered something early this year courtesy of international mail: the Argon One Mini Computer from Argon40. The Argon One is essentially an aluminium case (with a plastic bottom) for the Raspberry Pi, however words like "essentially" do a disservice to what is, in reality, a very clever piece of all-in-one Pi-tech.

ao_sans_gpio_cover

An aside: I do so love the term "mini computer" as each time I read this I see "minicomputer" which, as this article on Wikipedia shows, were anything but "mini" in a modern context. Back in the 1960s - 1970s they definitely were "mini" compared to mainframes and it just shows how far we have come in electronics.

The Argon One delivers a number of enhancements to the desktop Pi experience. These include:

  • all ports are relocated to the back of the case (remember the days when the Pi had spaghetti ports spewing from three sides?);
  • a power button (controlled via script);
  • a fan (controlled via script);
  • colour-coded and numbered GPIO pins;
  • easy access to the GPIO pins via a magnetic cover;
  • a large metal heat sink that is part of the all-in-one top cover;
  • generous ventilation holes including a neat ventilation duct above the fan and under the removable GPIO cover.
The Argon One also features a couple of IR headers on the daughterboard but these are currently unsupported. From a reply to a KS question on this topic:

"The IR is a future feature we are working on. But you can trace the pcb and the gpio’s it connects if you want to try playing around with it. But it is not an official feature of this version. We don’t support it at the moment but you are always open to play with it."

I like this: it's an all in one computer that comes with something extra to play with. What's not to like here?!

ao_ir

Building the Argon One was relatively straightforward after I first dismantled it. Well, what's the point of receiving a new gadget unless one deconstructs it entirely? The Argon One comes part-assembled with the main daughterboard screwed into the case. Unscrewing took minutes and flipping the board over revealed:

ao_daughterboard

You can clearly see the colour-coded GPIO pins that poke up through the top of the case, along with the reverse side of the header (on the left) that the Pi connects to at a 90 degree angle to the pins visible post-assembly. Note also the fan and my first mistake.

When I received the Argon One I noticed that the two cables connecting the fan were only pushed into one of the plastic retainers (see left of fan in above image). Thinking this to be an assembly error I pushed them back in. Upon assembly I realised my error: the cables now go straight across the closest screw hole or cover part of the fan. Oops. Cables de-retained back to original state.

After re-assembling back to the starting point (the above board is pre-attached on delivery) I found the instructions very easy to follow for the most part, albeit did get myself confused over the thermal pads. There are two of them (one thick, one thin) and the instructions do not make it clear which to use. In the end I chose to sandwich both together figuring that a really good connection is best. It could be that one is for the Raspberry Pi 3 B and the other the 3 B+ as the CPUs are slightly different heights. That would make sense but too late to turn back now (and no damage done in either case). I trimmed the excess from both pads in the end and this seems to squish fine.

ao_thermalpads

Talking of instructions it is excellent to see a modern gadget coming out of the far east that has properly written English instructions. They are clear, precise and provide genuinely useful information. Well done Argon 40 for providing such a good instruction booklet. This details hardware assembly, software installation (for the power button and fan control features) and instructions on using the power button. My only slight complaint here is that the instructions indicate a difference between a soft and hard ("forced") shutdown of but a mere two seconds with no indication of how or if this can be changed. Read on for my less-than-successful attempt at configuring this.

ao_manual

Assembling the Argon One involves attaching a smaller daughterboard to the Pi via HDMI and 3.5mm jack before plugging that into the larger daughterboard via the GPIO. The whole unit is then fixed in place with various screws.

ao_hdmi_daughterboard

ao_assembled_boards

Finally, with the base screwed in and SD card re-inserted (important: REMOVE the SD card BEFORE attaching the bottom of the case to avoid damage to either) it's ready to boot.

ao_argon_one

If you compare the first photo in this article to the one above you will notice that the GPIO pins are covered in the latter. This is achieved via a metallic plate (that doubles as an exhaust port for the fan) that snaps easily into place. This enables easy access to GPIO when needed, and clean lines with no exposed pins when not.

Upon first boot it's like, well it's a Pi, so nothing different really. I had thought that without light pipes there would be no way to see the Pi's LEDs on boot but I was pleasantly surprised that they are visible through the black plastic base to the front of the Argon One. To be honest they look more professional (somehow) like this, and I think that sums up the Argon One: this case makes the Pi a professional desktop computer.

Installing the Argon One software is a breeze via the instructions in the manual:

curl https://download.argon40.com/argon1.sh | bash

Piping an unknown command to BASH is potentially dangerous as you are running someone else's non-moderated code straight against your Pi. Instead I omitted the pipe to BASH part and scrolled through the code. A cursory look shows it to be fine to my untrained eyes. With that done I ran as instructed and very quickly had fan configuration and power control (via the Power button) set up. A quick double-tap of the Power button confirms the reboot function works as expected; marvellous!

One slight confusion for me is that the instructions describe a soft shutdown at 3-5s press of the Power button and forced at >+5s. In my mind a two second window was two narrow and I hope(d) to be able to change this. Looking in /usr/bin/argononed.py I could not see how the forced >=5s shutdown is triggered and can only assume that this is hardware

if pulsetime >=2 and pulsetime <=3:
   os.system("reboot")
elif pulsetime >=4 and pulsetime <=5:
   os.system("shutdown now -h")

To check if my assumption was correct I disabled the software service via:

systemctl stop argononed.service

I double-pressed power and the reboot did not kick in, confirming the service is down. I then held the power switch down for over five seconds. It did stop a few seconds later. I have posted a comment asking for clarification here.


The Argon One is fantastic. It is properly sturdy with the aluminium enclosure being a fine choice and the ventilation with fan should help the Pi 3 B+. This is one of the reasons I have swapped my Pi 3 B+ over from the Official Case to the Argon One: I was finding he Pi running rather hot after several weeks of constantly being on despite having heat syncs attached. I am hoping this will not be an issue with the Argon One with the software-controllable fan.


Before signing off this post it's worth noting a couple of issues with the Argon One:

  • I have tried plugging in a HAT and it won't fit as the pins are flush with the case. An extended header or use of a T-Cobbler in this scenario would resolve this. That said, I do not see this as a disadvantage to the intended use case of desktop-esque "mini computer" a la Mac Mini or similar.
  • In my personal opinion the placement of the 3.5mm jack and micro USB power supply sockets is a little odd. With the 3.5mm jack below the power connector it means that any audio lead plugged in will likely gently tug against the micro USB cable, which is not ideal. I do not see there will be a problem, just that in a perfect world nothing should be tugging on a power lead. I do understand why the Argon One is arranged in this way as the advantage is that the power button is easy to access at the top and both the 3.5mm and HDMI are connected via a single plug-in daughterboard.
If the above two items are not issues for you then the Argon One comes highly recommended based on my experience of building it.

Lastly, I would like to say something about the great way in which this Kickstarter has been run. From start to finish the Argon40 team have kept their backers informed, and when a slight delay was necessary due to re-working fan control (requested by the KS backers) this was communicated without delay. The net result is a KS delivered as expected without notable delays from a team that has put the effort in to run their KS campaign properly. Nicely done Argon40. You are the example of how KS campaigns should be run.
Comments

The MagPi: back in print

TheMagPi_i36_cover
Issue 36 of The MagPi magazine was recently released as a downloadable PDF. What ticks the awesome box though is that from this issue onwards the magazine is again available in print.

I worked on ~25 of the first 30 issues of The MagPi writing articles, proof reading and undertaking layout, and recall the fantastic feeling of seeing the magazine printed (thanks especially to Ian McAlpine). With options to purchase from several online Raspberry Pi sites as well as three Kickstarter bundles (including binder) the obvious missing link was high street distribution. The MagPi has now been under the wing of the Raspberry Pi Foundation for six issues and Issue 36 is the first to be available in the high street.

I'll say that again, with emphasis: in the high street.

It takes an incredible effort to launch a new magazine and arrange for distribution to WH Smith and similar. A HUGE well done to Russell Barnes, magazine editor and the rest of the team.

With the magazine back in print what is it like?

Firstly, the print quality is exceptionally high. The front cover has a joint matt-gloss effect with the title, most of the text and the Minecraft Splat elements in gloss on a light blue background. The cover paper used is also a fairly heavy stock and will survive some bashing (as I discovered when the magazine became an inadvertent fly swat the other day). Internally each page is full-colour and exceptionally clear and easy to read. This feels like a professional magazine in one's hand because, well, it is a professional magazine. Russell and co really know their stuff.

TheMagPi_i36_internal
With an increase in size to 100 pages the spine is thick enough that the magazine can sit on a bookshelf and the identity of each issue be determined from the spine. This does show the one drawback to a magazine of this thickness in that the pages will not lie flat. It's not a big problem, but it does mean that when following code tutorials with the magazine on your desk the pages tend to curve. Firmly (but not forcefully) pressing on the magazine once or twice will open up the pages further without damaging the spine.

TheMagPi_i36_contents
Yes, you did read the above paragraph correctly: 100 pages. This is the largest normal (i.e.: excluding Special Edition 1) issue of the magazine yet. Russell and his team have produced an absolutely fantastic publication with numerous hardware and software tutorials, reviews and features. A quick flip through finds 11 pages of adverts (including three asking people to consider subscribing) which I feel is reasonable for a magazine of this size (and the adverts are all Pi-relevant). Personal favourites in this issue include Extra Lives talking about retro gaming and the book review pages as these cover not only Pi-specific books, but also books of related interest. This issue a column of the book reviews pages is devoted to security and penetration testing which is an incredibly interesting subject.

The tutorials cater for all ability levels with a straightforward LED exercise in Python on page 23 at one end of the spectrum and applying physical forces to Python games to model gravity on pages 58 to 63. This is a very clever bit of code that models the movement of spheres, or celestial bodies (think: planets and asteroids). My favourite quote in the whole issue is found here:

For each planet we have, we want to calculate its effect on every other planet


That's a tough ask! Fortunately the article goes into exquisite detail on both the maths and programming needed to accomplish this.

One downside of print though is that if errors creep in then they are irreversible (unless a new print run is undertaken). Before printing The MagPi Volume 1-3 bundles we went back through every single page to update the content for the B+ (which had not been released when we wrote the earliest issues) and to correct any errors we had subsequently found for just this reason. With The MagPi issue 36, as with every magazine, a few gremlin have made it through the editing process and hence have, in print at least, become irreversible. Take the LED article on page 23 for example. The instructions and diagram show to connect to GPIO4 and GND, but the photo shows GPIO3 and +3V3 being used. Likewise, the code listing stated to use GPIO.BOARD but the pinout diagram for the Pi is numbered for GPIO.BCM. As an introductory article, "Get started with Raspberry Pi", errors like this may confuse the reader.

Despite the occasional gremlin the overall quality of the content is first rate. A lot of effort has clearly been put into the magazine. Whether you find reading easier in print or in an electronic format is a very personal thing, and with The MagPi available in both you can take advantage of both, for example: a print magazine that you can search for text within.

The new look MagPi magazine looks great, feels great and has the superb content we all expect from the publication. Best of all, the print edition is now available for a reduced price to subscribers.

Highly recommended.
Comments

PiConfig arrives

Another Kickstarter I’ve been eagerly awaiting recently is PiConfig. Described as the easiest way to set up networking on the Pi this USB stick of wonders looks just the business for when I need to rapidly reconfigure up to 6 Pis on my stand at Bristol Digimakers. Essentially the problem I face is that at home my Pis mostly use DHCP where-as at Digimakers I set up a LAN requiring them all to be on static IP addresses. It’s a real faff having to eject 3 SD and 3 micro SD cards, find the adaptor, and then one by one edit config.txt on a laptop, while trying to remember which card came from which Pi (note to self: must get out label printer).

Much easier, then, just to load PiConfig on my Mac, select the config setting for each Pi in turn, write to the Pi and hey presto all is done. This saves some time going from DHCP -> static (selecting the profile needed each time) and a whole lot when going from static -> DHCP (one config to rule them all). In both directions it wholly eliminates errors as well in the configuration of any card. Win.

So, the question is: does it work? The answer is yes, albeit with a few errors along the way.

The first thing one has to do is run an installer script on each Pi. For some unknown reason this is not included on the USB stick and instead wget must be used. This is a shame as the stick is 4GB in capacity and over 4GB is available. Hang on, that can’t be right:
piconfig_size
Well, apparently it is. Seeing this makes me wonder about the quality of the USB stick from years of reading “is your SD card genuine?” blog posts. Hence, best to take a backup of the software just to be sure. Weirdly this is where I encountered my first problem: right-clicking on the piconfig folder on the stick and choosing Compress “piconfig” results in an error that one file or the other could not be added to the archive. Hmm, this is now getting concerning. I confirmed the stick isn’t write only by creating a new folder on it temporarily.

Instead I copied the whole piconfig folder to my desktop and archived it to a zip there without problem.

Running the PiConfig application presented the program with pretty obvious fields to be completed. But, here again I found a problem: after entering configuration data for the LAN and clicking on the save profile button I was presented with an error, my profiles all disappeared and I had to quit and reload the program again to see them.

[UPDATED]Fortunately the Developer, Mihaly Krich responded very quickly to a message I sent him detailing this fault and has released an updated version of the PiConfig software that addresses this. With the update installed this bug is fixed. On Mac OS X 10.10 when you download the update and run the program you will be presented with a message telling you that only applications from known developers and the App Store can be run. This is a security feature on Mac OS X. To add PiConfig to the list of applications that can be run:

  1. Open System Preferences (quick shortcut: CMD+Space to open Spotlight, type pref and press enter)
  2. Click Security and Privacy
  3. Unlock the preference page by clicking on the padlock in the bottom left and entering your password
  4. Ensure that under Allow apps downloaded from you have “Mac App Store and identified developers”
  5. You will see that the Preferences already identifies that piconfig.app was the last application to need such permissions - click Open Anyway to add it to the safe application list.

piconfig_mac_preference_security

The software author has chosen to save my configuration data inside the Mac OS X package. This means that when when a patched version is released care must be taken to extract the files from /Volumes/PICONFIG/piconfig/osx/piconfig.app/Contents/Resources before replacing the application, else one’s configuration will be overwritten. On Twitter he noted to me that this was due to requiring sudo permissions in Mac OS X which the application does not have.

This save location prohibits the dual-use of any configuration file in Windows and Mac OS X as Windows computers cannot see inside Mac application packages (Mac apps are stored inside.app directories that masquerade as executable programs). I confirmed this to be a problem by loading the Windows executable on a different laptop and sure enough my previous profiles were nowhere to be seen. Given the profiles are saved to a plain text file, a format readable by both operating systems this should have been made accessible to both Mac OS X and Windows.

The final test though is: does this thing work? I can report that yes it does, and very well indeed. As advertised one of my Raspberry Pis is now on a static IP from DHCP... and now it is back to DHCP again after using PiConfig for a second time. Once over the configuration hurdles you can swap configuration on any Pi reliably in well under a minute.

Ultimately, despite less than ideal software and a USB stick that raises a Mr Spock eyebrow, PiConfig does do what it says on the tin and will be an essential part of my exhibition toolkit from now on. It saves me time and makes event setups that much easier.

4/5 “almost spot-on”
Comments

HDMPI arrives: assembly and first impressions

By chance I was actually in when the postman knocked on my door and gave me a plain brown cardboard box. Inside was HDMIPi in full kit-to-be-assembled form. This caught me surprise as I thought HDMIPi was still at the assembly stage (clearly I need to read my emails more closely). Great stuff: a new kit to play with :)

HDMIPi011

The whole package is pleasingly arranged in the box, with the several layers of case surrounding the screen, which came in bubble wrap to protect it. A nice thought. Anyway, that’s enough of unboxing *yawn*. Let’s play with the thing.

Assembly

There is a great video from raspi.tv along with instructions on the HDMIPi website. The video really is step by step and you really can follow it along. Alex Eames has done a great job of explaining exactly which way around all the case components go. Have a dust cloth and a little rocket blower like the Giottos GTCL2810 Q.Ball Angle-Adjustable Air Blower handy to keep dust off. I managed to get two annoying dust spots on the screen before assembly, but in the scheme of things that’s a “meh” and I probably won’t worry about them.

My only two niggles are:

  1. The two 12mm x 2.5mm screws looked identical to the 12mm x 3mm screws at first. So much so that I’d put them into the edge holes on the case and had to go fish them out again. Mental note: always count your screws before building anything.
  2. The USB - micro USB cable that connects the driver board to the Pi is a tight squeeze. It has a double-U (a bit “W”-like I guess) curve that meant it didn’t want to sit parallel in either socket until I applied a fair bit of “bend-thine-cable” force to the cable itself. Now though seems fine and I guess we’ll see soon if it pops out. IMHO a flat mini noodle-like cable would have been better here and this is something I’ll likely take a look at in the future if this proves an issue. You can see the cable in the photo below.
HDMIPi015

The driver board is held securely next to the Pi and there’s no problem in assembling it all. After assembly there is definitely space for a slimline battery in there.
HDMIPi013

To be honest the driver board is a thing of beauty, it really is. It’s darn compact and given it supports a second HDMI output (unfortunately not dual-monitor) it means you can plug your Pi into the widescreen TV in your lounge without having to dismantle the enclosure. Nice.

First boot

The Pi booted first time and the screen lit up without a hitch. I was slightly surprised to see it claiming full HD 1920x1080 when the advertised specs were for 1280x800. However I think (not confirmed) that the higher resolution is scaled. In either case it certainly looked cramped on screen. I followed the instructions to change this to 1280x800 and the whole package became immediately more usable.

How’s it handle

It’s a fairly solid surround, as you’d expect from Pimoroni. A gripe here is that the driver board is only about half an inch from the case and without too much difficulty things could possibly fall in and short. But that’s a hypothetical risk, not something I’ve had a problem with. Your fingers are unlikely to find themselves inside.

One thing I would love (love I tells ya!) would be a rubber bumper surround for the whole thing. I’m going to suggest this to Alex.

HDMIPi020

The ethernet and USB ports have a cut away at the case which you may need to remove. I made the mistake of plugging in an ethernet cable without removing this plate: try unclipping an RJ45 ethernet connector with anything less than a it-conducts-electricity screwdriver and you’ll see what I mean. This won’t be a problem if you remove the cut edge plate first, or use a dinky WiFi dongle (as I now am).

I’ve been toying with buying a new wireless keyboard and trackpad combo to replace my wireless keyboard and mouse and now seems a good opportunity to do so as the adaptor sits too far out from the board, and is kinked at a nasty angle. Again, fixable with a smaller adaptor or by cutting away the small edge panel. Something to be aware of anyhow.

HDMIPi018

Something has to be said for how the driver board dishes out power to the Raspberry Pi. To give you an idea: without HDMIPi a WiFi dongle plus my wireless keyboard and mouse adaptor has always been too much for the USB ports regardless of power supply I use (Even good quality 2A ones). Either the mouse goes all jittery or the WiFi is up and down like a Yo-Yo necessitating the need of an external powered hub. However, with HDMIPi I’ve found so far that this combination is rock solid: WiFi AND a mouse at the same time! Bonza! Obviously you’re mileage will vary.

A note on GPIO: all the pins on the P1 header are available, sunk slightly (~2mm) into the case. This should protect them if you accidentally put the HDMIPi down on something conductive (and when’s that a good idea?). Would you believe it, your GPIO expansion board of choice may work. I tried PiLite and XLoBorg were fine, but TriBorg catches on the plastic case slightly. If this is an issue you can always use a ribbon cable to solve this. XLoBorg is an interesting one as it gives HDMIPi accelerometer and magnetometer capabilities, which coupled with a wireless, battery powered Pi is very, very interesting. A bit of black masking tape, or Sugru would do the trick nicely to cover up XLoBorg.

HDMIPi016

HDMIPi017

HDMIPi019

(The bump out the bottom left is my oh-so-slightly too large wireless keyboard and mouse adaptor).

There you have it, a first look at HDMIPi. My take: an absolutely top notch way of getting a portable 9” screen fastened to your Pi without sacrificing functionality (GPIO or external HDMI connections).
Comments

Raspberry Pi Projects for Kids

First, a disclaimer: I'm one of the volunteer technical reviewers of the book, albeit I do not know Daniel the author and hence do feel I remain impartial. Having read it cover to cover more than once and having gone through every single example I do feel I'm qualified to comment on the book and recommend it.

The book is split into essentially three projects (one with extensions - see below) with the compulsory Getting Started with the Pi that all Pi books seem to have leading the reader in. However kudos to the author for both introducing the command line in the first chapter (an important topic), and also providing a short troubleshooting section for common my-Pi-doesn't-work problems.

Over to the projects: the first, writing a simplified version of Angry Birds in Scratch, is a great way into programming. What I absolutely love about this project is that it introduces an element of real world physics into the equation of how the character moves around the screen. This isn't just yet-another "my cat moves" project. Oh no. On Page 30/31:

"Adding physics...
First, let's add some gravity".

This is done by using separate x and y "speed" variables. Changing the value of y by a negative amount will effectively act to pull the character a little back to earth. This is a great concept to introduce to kids: that variables can be used to control stuff, and you can simulate real-world physics in a computer. It really sets off those neurons: what else can I model in a computer? Absolute top marks to the author for including this. I was smiling a lot when I read this section while reviewing the book.

Onto the second project, and from here on in we're moving from Scratch to Python. What's more the author introduces a basic electronic circuit in the form of a home-made (Blue Peter style with tape and paperclips) game pad controller. This is an entirely achievable project for kids as it involves no soldering. However it may be an idea to work with young kids on this project as there is a possibility of frying the Pi's GPIO port if the cables are badly connected. Done well it'll work a treat. One especially nice touch in this chapter is that the author shows a section of code in Scratch and then presents the same functionality in Python. This definitely eases the transition from one to the other.

And finally the third project. This introduces user interfaces via a project to interface with Google Maps. It's a more complex (but not unachievably so) project that takes one through creating a GUI (using Python's TKinter), obtaining map data via the Google API (and pre-selecting the map's location, scale and size in pixels) and then adding additional user-interactive (via detecting mouse clicks) functionality to the map. As with the previous projects there are some great touches here-in such as introducing the concept that computer languages generally count from 0 and not 1 (ie: the first item is 0 and the second is 1).

So why 4 and not 5 stars? Well, it's a tricky one: the projects genuinely are interesting, achievable, and people of all ages will learn from them, and the book is a reasonable length for a reasonable price. However one does feel that just one more chapter would have been good. I say this as the extensions to the interactive map project, while great ideas, could have been flushed out into a chapter of their own. This is however a grumble more than a genuine complaint. If I could, I'd have given 4.5 stars.

This is an absolutely great read and I genuinely believe that kids will be able to follow these projects at their own pace and gain from them.
Comments

Raspberry Pi Handbook magazine magazine out now

The postman dropped off something I’ve been waiting to see for a while, the Raspberry Pi Handbook, a Linux Magazine Special (#14). 98 pages of Pi goodness with very few adverts makes for a compelling read. Although the price tag of £7.99 feels a little steep that’s the price of more content and less adverts hence I feel it is justified.
RPi_Handbook_LinuxProMagazine_no14
Inside you’ll find lots of new articles on the Pi covering the OS and software, programming and hardware hacking. There’s a particularly interesting article on hooking up a USB weather station to the Pi and outputting the data recorded via a web server (also hosted on the Pi) that I think I’ll be trying out. There is also a very interesting interview with Eben Upton that is worth a read, noting that this interview is available to read for free online. The magazine comes complete with a DVD containing a number of different operating systems for the Pi which is handy to avoid potentially lengthy downloads in some cases, albeit at the price of the ISO images burned to the disc eventually becoming out of date.

The magazine also includes several articles re-printed from The MagPi and it is good to see The MagPi (even if only in part) making its debut on the shelves of WH Smith.

One thing I especially like about the Handbook is that it rapidly goes from beginner to advanced without feeling the need to trudge through endless “this is what a keyboard is: you press the keys and magic happens” very basic introductions to the Pi. There is a lot of straightforward stuff contained in the magazine but the reader is rapidly taken on to advanced topics including compiling from source. Good to see.

Raspberry Pi Handbook, available from... well pretty much anywhere that sells magazines.
Comments

Nokia 3310 LCD board for Raspberry Pi

I recently ordered a Nokia 3310 LCD shield from Texy. The beauty is it comes pre-assembled with 5 micro switches and the 84x48 LCD so no soldering required. The price was pretty superb too at £14 + £4 postage. I looked up the list price of just the LCD and it is about £10 hence 8 pounds extra for a fully assembled board delivered to my door is a bargain.

I have some interesting plans a-foot for this little board.

To get it up and running I needed to install WiringPi from Gordons Projects to work with Texy’s sample code. Be sure to install WiringPi for Python though else you’ll sit there confused like I did wondering what went wrong ;)

Texy_Nokia3310LCD

Something that is most interesting with the 3310 LCD is that it has no internal font set. Consequently you have to define all characters in hex up-front. Luckily (and VERY thoughtfully) Texy provides sample Python code to introduce the functionality of the board which includes a default fairly small font. Calling:

text(‘Hello world’)

will display the text string on-screen. One of the first things I did was to port a pretty good large font to Python from C, the latter courtesy of Petras Sadulkis. The large font takes up three rows per character meaning I had to get it to loop through each row of the array which takes me into my favourite world of multi-dimensional arrays :) (ask me sometime why I love multidimensional arrays so much...) You can see the board outputting the current time (HH-MM, SS.ms) using this larger font.

Here’s some code to get large text working for you for numbers and a few characters (add this into Texy’s sample code), and I apologise in advance for the gratuitous hex:

def display_largechar(char, character_position, display_on_row, font=LARGEFONT):
  try:
    gotorc(0 + display_on_row, character_position)
    for value in font[char][0]:
      lcd_data(value)
    gotorc(1 + display_on_row, character_position)
    for value in font[char][1]:
      lcd_data(value)
    gotorc(2 + display_on_row, character_position)
    for value in font[char][2]:
      lcd_data(value)
    lcd_data(0) # Space inbetween characters.
  except KeyError:
    pass # Ignore undefined characters.


def largetext(string, display_on_row, font=LARGEFONT):
  character_position = 0
  for char in string:
    display_largechar(char, character_position, display_on_row, font)
    character_position += 2

# Based on http://mbed.org/users/snatch59/code/N3310LCD/
LARGEFONT = {
  '0': [
    [0x00,0x00,0xc0,0xe0,0x70,0x30,0x30,0x30,0x70,0xe0,0xc0,0x00,0x00,0x00,0x00,0x00],
    [0x00,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x00,0x00,0x00,0x00],
    [0x00,0x07,0x1f,0x38,0x70,0x60,0x60,0x60,0x70,0x38,0x1f,0x07,0x00,0x00,0x00,0x00],
  ],
  '1': [
    [0x00,0x00,0x00,0xc0,0xc0,0xc0,0xf0,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],
    [0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],
    [0x00,0x00,0x00,0x60,0x60,0x60,0x7f,0x7f,0x60,0x60,0x60,0x00,0x00,0x00,0x00,0x00]
  ],
  '2': [
    [0x00,0xe0,0x60,0x70,0x30,0x30,0x30,0x30,0x60,0xe0,0x80,0x00,0x00,0x00,0x00,0x00],
    [0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xc0,0xf0,0x3f,0x1f,0x00,0x00,0x00,0x00,0x00],
    [0x00,0x70,0x78,0x7c,0x6e,0x67,0x63,0x61,0x60,0x60,0x60,0x60,0x00,0x00,0x00,0x00],
  ],
  '3': [
    [0x00,0xe0,0x60,0x70,0x30,0x30,0x30,0x30,0x30,0x60,0xe0,0xc0,0x00,0x00,0x00,0x00],
    [0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x18,0x3c,0x7c,0xe7,0xc3,0x00,0x00,0x00,0x00],
    [0x00,0x38,0x30,0x70,0x60,0x60,0x60,0x60,0x70,0x38,0x1f,0x0f,0x00,0x00,0x00,0x00],
  ],
  '4': [
    [0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xc0,0x60,0xf0,0xf0,0x00,0x00,0x00,0x00,0x00],
    [0x00,0xe0,0xf0,0xdc,0xce,0xc7,0xc1,0xc0,0xc0,0xff,0xff,0x00,0x00,0x00,0x00,0x00],
    [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0x7f,0x00,0x00,0x00,0x00,0x00],
  ],
  '5': [
    [0x00,0x00,0xf0,0xf0,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x00,0x00,0x00,0x00,0x00],
    [0x00,0x00,0x1f,0x1f,0x18,0x18,0x18,0x18,0x30,0xf0,0xc0,0x00,0x00,0x00,0x00,0x00],
    [0x00,0x30,0x70,0x60,0x60,0x60,0x60,0x70,0x38,0x1f,0x0f,0x00,0x00,0x00,0x00,0x00],
  ],
  '6': [
    [0x00,0x00,0x80,0xc0,0xe0,0x60,0x30,0x30,0x30,0x30,0x30,0x00,0x00,0x00,0x00,0x00],
    [0x00,0xfc,0xff,0x33,0x18,0x18,0x18,0x18,0x18,0x30,0xf0,0xc0,0x00,0x00,0x00,0x00],
    [0x00,0x07,0x1f,0x38,0x70,0x60,0x60,0x60,0x60,0x30,0x1f,0x0f,0x00,0x00,0x00,0x00],
  ],
  '7': [
    [0x00,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0xb0,0xf0,0xf0,0x00,0x00,0x00,0x00,0x00],
    [0x00,0x00,0x00,0x00,0xc0,0xf0,0x78,0x1e,0x07,0x01,0x00,0x00,0x00,0x00,0x00,0x00],
    [0x00,0x60,0x78,0x3e,0x0f,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],
  ],
  '8': [
    [0x00,0x80,0xe0,0x60,0x30,0x30,0x30,0x30,0x30,0x60,0xe0,0xc0,0x00,0x00,0x00,0x00],
    [0x00,0x87,0xe7,0x6c,0x18,0x18,0x30,0x30,0x38,0x6c,0xc7,0x83,0x00,0x00,0x00,0x00],
    [0x00,0x0f,0x3f,0x38,0x70,0x60,0x60,0x60,0x60,0x30,0x1f,0x0f,0x00,0x00,0x00,0x00],
  ],
  '9': [
    [0x00,0x80,0xc0,0x60,0x30,0x30,0x30,0x30,0x70,0xe0,0xc0,0x00,0x00,0x00,0x00,0x00],
    [0x00,0x0f,0x3f,0x30,0x60,0x60,0x60,0x60,0x60,0x30,0xff,0xff,0x00,0x00,0x00,0x00],
    [0x00,0x00,0x00,0x60,0x60,0x60,0x60,0x70,0x38,0x1e,0x0f,0x03,0x00,0x00,0x00,0x00],
  ],
  ':': [
        [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
        [0,00,56,56,56,56,56,56,56,56,56,0,0,0,0,0],
        [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
  ],
  '+': [
        [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
        [0,0,64,64,64,64,64,254,254,64,64,64,64,64,0,0],
        [0,0,0,0,0,0,0,15,15,0,0,0,0,0,0,0]
  ],
  '-': [
        [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
        [0,64,64,64,64,64,64,0,0,0,0,0,0,0,0,0],
        [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
  ],  
}

from datetime import datetime

# clear the screen then display the time HH:MM on one row and SS:ms on another
cls()
now = datetime.now()
largetext(now.strftime("%H:%M"),0)
largetext(now.strftime("%S.%f")[:5],3)

With the large font in place and the time display working I can move on to adding a stop watch, along with some configuration menus for brightness, contrast and a few other parameters. Once this is done the fun begins as I’ll be using it to remotely control my two Nikon cameras using the time and stop watch functionality to control when the Pi triggers the cameras to take a photo.

This is a great board to experiment with. It brings out the hex in all of us;) Luckily there are tools online to help out with generating hex images in case you need them:

http://www.quinapalus.com/hd44780udg.html (online character generator - this is pretty nifty)
http://en.radzio.dxp.pl/bitmap_converter/ (LCD Assistant: windows tool for converting monochromatic bitmaps to hex data arrays)

As you can probably tell I’m very pleased with this shield. If I was being picky I would say, as Texy notes, it “almost” fits within the credit-card form factor of the Pi, with the red board under the LCD just poking out a little. I’m hoping this can be sorted as it means the board won’t fit inside tight-fitting cases designed for the Pi. But apart from that, this shield gets a thumbs up from me.
Comments