One of the biggest advantages of the Raspberry Pi as a development platform is the easy access you have to a lot of mature, well-designed SW stacks and libraries, making it relatively trivial to perform tasks that would be very complex or time-consuming to implement on deeply embedded mcu-based systems.

One of the areas where this is particularly true is with graphics and user interfaces.  The HW requirements are fairly high to be able to work with large displays (larger than say 320x240 pixels), and even if you can meet the timing requirements -- a 7" 800x480 display probably requires ~40MHz for the pixel clock -- there are very few open source or inexpensive graphics frameworks out there to render the kinds of modern UIs people expect today.

The Pi is really stands out here since it's trivial to render complex UIs, taking advantage of modern features like Unicode text and complex scripts, and being able to use different fonts without having to worry about memory and rendering time (it can take a couple hundred KB of SRAM to render a TTF on an embedded system, and the libraries to interpret them are both large and complex), etc. You can also easily display the graphics on any inexpensive composite television or HDMI monitor, which is amazing for a $35 board ... more than the cost of many LCDs!

This tutorial will show you one way to get started drawing graphics on an external display using pygame along with Adafruit's WebIDE, and almost any external display (several are available here).

What You'll Need

Development Tools

This tutorial uses Adafruit's WebIDE.  It's an ideal development environment to work with external displays, since you can display your debug output and keep the shell visible while the display contents are changed on the remote display, and easily upload files (images, fonts, etc.) to the Pi. 

You could also work via SSH, but as you'll see later in the tutorial this is less convenient since you'll need at least two sessions, it's more cumbersome to transfer files, and you'll probably find the text editor in the WebIDE more natural to use than vi or nano if you aren't already an experiences Linux user.

If you're not already using WebIDE -- have a look at our easy to follow learning guides below:
Last updated on 2014-04-22 at 04.37.40 PM Published on 2012-10-19 at 06.17.57 PM