User manual

LPCXpresso Experiment Kit - User’s Guide
Page 136
Copyright 2013 © Embedded Artists AB
8.6 Control a LED Matrix
Interface an 8x8 LED matrix. There are both single color and RGB-LED matrixes. Create an
application that can control each individual LED in the matrix.
To control the matrix it is suggested to have a timer interrupt that updates the LED matrix in a
multiplexed way, i.e., one columns or one row at a time. The frequency must typically be at least 100
Hz in order to avoid flickering. The timer interrupt function can get information about which LEDs to
turn on/off from a 64 bit array, i.e., a vector of 8 bytes. In case of an RGB-matrix, three such bit arrays
are needed, one for each color.
As a start, create an application that updates the 64 LEDs so that messages can be streamed. A
simple solution is to just store the bit pattern of the message. A more advanced solution can store the
messages as ASCII strings. In the latter case, a bit map defining all characters must also be defined.
For more advanced, and fun, use, create a game for the LED matrix. See for example these projects
for some ideas:
- http://www.evilmadscientist.com/2008/meggy-jr-rgb/
- http://hackaday.com/2010/02/19/update-most-interesting-game-in-64-pixels/
- http://interactive-matter.eu/blog/2010/05/08/blinken-buttons-for-beginners-a-smt-beginners-kit/
8.7 Create a Game with Display + Accelerometer or Gyro
Create a game with a graphical display and an accelerometer or gyro. Navigating a rolling ball in a
labyrinth or recreate the classical snake game, for example.
8.8 Create General Menu System for a Display
Create a general menu system for small character based LED, for example a 2x20 character display.
Use the joystick-buttons or the rotary switch as user input.
To get some ideas about which functions that are needed in a menu system have a look at older (non
smart phone) cell phones. These phones had small displays and few buttons. There you can find many
typical functions that are needed.
Character based LCDs typically have an 8-bit parallel interface. Many of them also have a 4-bit
interface mode (to save interface pins). Write code that works for both modes.
Alternatively us e a graphical display for more flexibility and nicer looking interfaces.
8.9 Retrieve Information from Web Servers
A web browser used the HTTP communication protocol (on top of TCP/IP) to retrieve information from
web servers. More specifically, it’s the GET request that is used.
Create an application that connects to a web server (typically port 80) and send a HTTP GET request
and displays the information in a suitable way, for example on the console or a display. When the data
is received it must be interpreted in order to extract the usable information.
A typical setup can be a system with a web server that resents the analog values of the two analog
inputs on a HTML-page. If another embedded system shall also retrieve this information, it must
interpret the HTML-data and extract the correct information, i.e., the analog values.
8.10 USB Mouse Emulation
Create a USB device application that emulates a USB mouse. You need to implement a USB HID
device. HID stands for Human Interface Device, which is exactly what a mouse is. Study USB-related
documentation to find out more about this.
The joystick switches can be used to move the mouse position, and in the end move the cursor pointer
on a PC screen.