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.

Continue reading “Python Maps Mouse Movements On An LED Matrix”

Ancient Mouse Teardown And Repair

For a young geek in the 80s, the it computer was the IBM PCjr. On paper, it was a truly remarkable leap in technology. With a wireless keyboard, light pen, and optical mouse it was an impressive, if maligned, piece of hardware. There was a small problem with the optical mouse, though; it required a special mousepad. [Michael], a PCjr aficionado, decided to make his own optical mousepad. It works, and was a lot easier to build than finding a used one for sale.

The PCjr mouse used two photodectors – a red LED and photodector for the horizontal axis, and an IR LED setup for the vertical. Light is shot through two holes in the bottom of the mouse and reflects back onto the photodetectors. [Michael] emulated the old mousepad with a sheet of aluminum foil and a transparency with a printed grid pattern. Surely not as elegant as an original, but it does the job nonetheless.

This clever-for-its-day optical mouse setup wasn’t limited to the lowly PCjr. A number of old Sun workstations had a similar setup that used small dots on the mousepad. There were several generations of mousepads that were generally incomparable with each other (because one type of mousepad wasn’t proprietary enough for Sun), but we would assume a similar build would work for these forgotten mice.

Thanks to [josh] for sending this one in.

Pep Up Your House Cat’s Boring Wintertime Life

With winter upon us, and all the windows shut, [Garfield] and [Socks] can get a little restless. But [Dino] is determined to keep his furry friends entertained through the cold dark months. He hit the junk box, and used some interesting fabrication techniques to build the Chase-a-Mouse motorized cat toy.

The toy is popular with the cats because it incorporates two traditionally satisfying features; something to chase, and an obstacle to chase it around. The base of the unit is a long plank which is held up from the floor by a couple of inches. The loop of rope which spans the board’s length has a mouse attached to it with about six inches of string. When the motor is flipped on it bounces and jerks its way around the circuit, darting in and out of the space below the base.

As you can see in the video after the break the motor is a bit loud. [Dino] used the sweeper motor from a Roomba for this. It might freak the kitties out at first, but curiosity will get the better of them eventually. It’s a quick build, and we love the drill-turned-lathe that is used make the wooden pulley for the system.

Continue reading “Pep Up Your House Cat’s Boring Wintertime Life”

Hackaday Links: September 28, 2011

Disposable coffee maker

[Sepehr] didn’t have a coffee maker, and the local coffee shops were all out of joe. He got his fix by making a drip coffee maker out of disposable cups and knives.

Flexible braille display

Thin film technology is being developed to help the visually impaired. This flexible OLED display has embedded muscle cells which create a braille display. [Thanks Aaron]

Printable iPhone tripod mount

Looking to make those iPhone videos a little more stable, and the pictures a little less blurry? Try out this printable tripod mount that [Chris] came up with.

Arduino macro photos

Speaking of photographs, [Daniel] wrote in to share some macro pictures he took of an Arduino. They’re sure to be of interest to those readers who love everything Arduino.

Carpeting a mouse

Add a unique texture to your mouse by covering part of the body with fabric. The lower half of the mouse case above is covered in a carpet-like material [translated]. [Thanks Clicker]

Interfacing With A PS/2 Mouse

[David] sent in his implementation of reading a PS/2 mouse with a PIC microcontroller and some LED displays. Of course, this follows hot on the heels of using a PIC with a PS/2 keyboard so now might be the time to start digging out your old peripherals out of your junk pile.

[David] began his project trying to figure out how to connect a mouse to his breadboard. After hacking the plastic off a PS/2 mouse extension cord, he wired everything up according to the pinout. Programming the PIC to understand PS/2 commands was a little strange. [David] is used to having his microcontrollers provide the clock signal. The PS/2 protocol is a bit strange as the peripheral sets the clock. Since PS/2 is a bidirectional protocol, the mouse also accepts commands. The host – [David]’s PIC – must send the mouse a command to start sending movement data.

Because USB keyboards and mice are backwards compatible with PS/2 ports, [David] tried out a few USB mice with a USB to PS/2 adapter. Every attempt at using a USB mouse failed. Strangely, when a Bluetooth mouse was tried (via Bluetooth to USB to PS/2), everything worked perfectly. Check out [David]’s PIC mouse demo after the break.

Continue reading “Interfacing With A PS/2 Mouse”

Mouse And HDD Combo Show Off Your Data Gluttony

databot_mouse

So we know you’ve got a lot of porn on your computer, but just how much is a lot? This concept mouse and hard drive combo aims to show you just how much digital junk you have acquired through physical feedback.

The DataBot mouse looks like a typical run of the mill scroll mouse that you might get with a new computer. Inside however, the designers have added a small servo which alters the ease with which the ball moves. The more files you have stuffed into the folder you are moving around, the more the mouse resists, giving you a sense of the physical “weight” of your computer’s contents.

The DataBot hard drive gives you a sense of how full your computer is by growing and shrinking based on space usage. During file transmissions the hard drive blinks its LEDs to indicate how fast or slowly your files are moving. When the inevitable file access error occurs, the LEDs switch to a bright red hue and the drive shakes to indicate there is a problem afoot.

With the price of data storage decreasing by the day, it’s easy to get lost in a glut of information without realizing just how much data you have. This is definitely an interesting way to get a different look at your data consumption.

Check out the videos below to see the pair in action.

[via Dvice]

Continue reading “Mouse And HDD Combo Show Off Your Data Gluttony”

We’ve Got A Real Bone To Pick With This Mouse

Finally, there’s a way you can feel like a real bad-ass while you’re formatting those TPS reports. It’s all thanks to this computer mouse built inside the skull of a dog. [Shannon Larratt] dug through his collection of skulls and came up with this one because it fits nicely in the palm of your hand.

Before you get too grossed out, this is not actually part of an animal’s body like another notable mouse hack that comes to mind. [Shannon] started with the skull of a small dog, making a mold for the pieces used in the finished version above. He was quite creative when fitting the electronic parts inside of his reproduction. He pulled the PCB from a $10 Logitech mouse and had no trouble getting it to fit into the base of the skull. But when it came to the buttons he ended up engineering a couple of rockers and used a belt to reposition the scroll-wheel. Not wanting to lose the middle-click feature there’s an additional lever for that functionality. We’d also like to compliment him on the quality of his write-up. Fantastic!