I had the i-buddy plugged in at work to the Ubuntu box for a long time, but one day I switched to a laptop, which makes it a little bit less convenient to plug in the i-buddy. The poor thing was collecting dust in a drawer for many months, until this summer I decided to plug it in to my Raspberry Pi as a stand-alone physical event notifier.
Since I had had luck with the linux drivers last time I decided to try it again on the Pi. No luck. It just wouldn’t find it! I was probably doing something stupid. Anyways, I decided to try out a python library instead called pybuddy. This was fine by me as most Pi projects are written in Python anyway.
pybuddy
pybuddy can be used in two ways. You can either use pybuddy.lib in your own program, or you can use pybuddy-daemon.py to start a standalone server which takes commands via port 8888 on 127.0.0.1.
Whether you use pybuddy as library or a server, you might have to configure it. It assumes that your i-buddy’s product id is 0x0001. In my case it was 0x0002.
When plugging the i-buddy in, call dmesg:
1 2 3 4 5 6 7 8 | |
In this case the product id is 0002, so pybuddy has to be updated here:
1 2 3 4 5 6 7 | |
Or equivalent in pybuddy-daemon.py.
To make sure it works, you can run pybuddy-daemon.py (it is self-contained, so remember to update the product id in this file as well!):
1
| |
Then in a separate terminal, type:
1
| |
and you should see the i-buddy flapping, twisting and flashing. Please note that if your USB power plug isn’t powerful enough your Pi might actually reboot instead! I got it working with my 2A power plug (though I think the Raspberry PI is not supposed to use more than 1A anyway). I use a powered USB hub just to make sure.