minimus – thinkl33tmake all the things2016-07-06T16:20:14Zhttp://thinkl33t.co.uk/feed/atom/WordPressthinkl33thttp://thinkl33t.co.uk/?p=1652014-03-01T12:30:59Z2014-03-01T12:22:32Z[…]]]>I’m a big fan of XBMC, and have an Ouya running XBMC set up in my lounge, streaming from my NAS. I normally use XBMC remote on my phone for controlling it, but this gets annoying when the phone is on charge, or I’m using it for something else.

I noticed that the majority of my TV remote is completely unused when the TV is in HDMI mode, and had a bit of a lightbulb moment!

Almost none of these buttons are used!

I already had an Arduino Pro Micro (£3) lying about i’d bought for testing out as an upgrade path for the minimus based projects i’ve been playing with. It is leonardo compatible, small, cheap and pretty easily available. I added an IR Receiver (£1.10) to the weekly Hackspace Farnell order to complete the parts list.

The pinout of the IR receiver makes it very easy to connect to the pro micro, using the RAW (VUSB), GND, and A3 pins. I just bent the OUT pin (pin 1) on the receiver to the left a bit as follows:

The body of the receiver fits perfectly behind the USB plug, flat against the voltage regulator. I used the IRremote arduino library to grab data from the remote using the IRrecvDemo sketch and mushed some buttons:

My remote uses 0xFFFFFFFF as a ‘key repeat’ code, about every 200ms when the button is held down. I found that in practice I had to ignore the first of these, as it was repeating way too fast and doing double presses.

I tweaked the IRrecvDemo sample code, added in a bit of keyboard and came up with some working code:

]]>0thinkl33t2012-03-16T13:15:56Z2012-02-19T09:37:31Z[…]]]>Ok, bit of explanation first. We have an iMac set up as a ‘democratic jukebox’ at HAC:Manchester. The idea being that anyone can put music on it, and it plays the entire library on shuffle during our hack sessions for a bit of background music.

The problem is, of course, some people have an… odd taste in music, so sometimes the jukebox ends up flipping between Aqua and Cannibal Corpse for ten minutes, and the horror of this was just too much!

Enter the PANIC button.

The button uses a minimus board. The minimus is a carrier for the AT90USB162, an AVR microcontroller with onboard USB hardware, which means it can be programmed to show up as any USB device. Before getting the button I modified one of the pieces of LUFA demo software, a media keyboard, and stripped it down to just read the one button on the minimus. When the button is pressed, it sends the keycode for next track.

The button’s housing is a joke button that played an alarm and flashed when pressed, I ripped its guts out to get to the switch. After finding the switch contacts on the original board, i soldered on two wires to connecto to the AVR.

Next, I stripped off the USB connector from the minimus, and added a 1m USB lead directly to the pads, to make it fit in the old speaker housing section of the button. I connected the leads from the button to PD7 and GND on the minimus, the same as the onboard button. This has the handy side effect that if the button is pressed while being plugged in, it boots into DFU mode, allowing me to upgrade the firmware easily.

I cut a slot in the casing for the wire to escape, and added a couple of cable ties for strain relief.