Python maps mouse movements on an LED matrix

[Vinod Stanur] is working with a mouse input and a microcontroller driven LED matrix. The mouse cursor is tracked inside of a window by Python and the resulting coordinates on the LED grid are illuminated. He calls it an LED matrix “Paint Toy” because one of the features he’s included lets the user create pixel art like in MS Paint.

The 10×8 grid of lights is controlled by a PIC 16F877A. This display orientation is perfect for the 8-bit controller, which uses an array of ten bytes to keep track of the pixel data. A computer running his Python application (which uses the Pygame module to track the mouse movements) communicates with the display board via an RF connection. Five bytes plus a stop character make up the communication packet. The first two bytes contain the coordinates of the cursor, the other three bytes contain mouse button status.

As you can see in the demo after the break, the system is very responsive. The mouse can be moved quickly without latency issues, and if the cursor leaves the tracking window it gets picked up right away when it re-enters.

8 thoughts on “Python maps mouse movements on an LED matrix

  1. It would be good if this were scaled down. You could swap out the LEDs for some pins and embed it in the top surface of the mouse. It would give a nice interface for low vision peeps. Combine it with some form of braille reader across the left mouse button (or right for lefties). Had the idea a few years ago. Never got round to it.

    1. Sounds so easy ‘swap out LED with pins” but how the hell are you going to actuate all those tiny pins?
      It is about time they brought out modules like that, it would be nice for many tactile projects, but so far it does not exist does it?

      But yeah micro mechanical needs more attention from the industry, people are already starting to bitch about the no-button smooth interfaces on smartphones and such, it starts to make people realize not ever feeling anything is a bit unnatural and irksome after a while.

      1. Oh I know, it’s the main reason I didn’t persue it any further. Perhaps a matrix of piezo electric “dots”, or maybe drive the print head of a dot matrix printer with a uc.

  2. Not to be rude, but this is mis leading, this is just a PC pixel display, when you think about it, the PC just sends data to turn on/off an led.

    I agree with Christopher, ditch the PC

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s