After working with microprocessors and other low-level C programming, I found myself getting really tired of bothering to set up an elaborate cross-compilation development environment and a chip programmer and all of that jazz. Being able to shell into the bug and fire up a python interpreter made me really happy since I use python so much in the desktop / server environment. In those instances I often use python to klude together several applications that need to be automated, or to parse the output of a program, or any instance where I wanted to use bash scripting but didn't want to deal with wrestling it to do what i wanted it to do. And so I dreamed that I would be able to do the same thing, but with Bug Modules...
...Well long story short, after digging through C headers, source code, and python documentation for a few days, i've written a fairly complete interface for the VonHippel module. You can turn the GPIO and IOX pins on and off, read their status, read from the ADC, change the adjustable voltage output, and even write to the SPI bus (altough that is untested). I've also written up a wiki entry on python development, with hope that others will catch on and take a stab at writing the low-level ioctl() calls to speak with bug modules. I tried to keep everything as simple as possible, so that even python / C novices can give it a shot. If you are more of an embdedded linux or python guru than I, please feel free to correct and update and contribute.
This remains a work in progress, as there are many hurdles in implementing other modules, and that the current kernel driver architecture doesn't allow you to share resources on a BMI slot. Also, not all of the hardware on the VonHippel module seems to be accessable via the kernel module, so sadly the i2c and i2s busses aren't useable as of yet. However, word has it that a few changes to the module drivers will start to change this... Stay tuned, and maybe buy misaacs an extra beer or two...
More information about Python and ioctl() calls.
Loading recent content...





Post Comments
Add Your Comment!
» All comments» Comments RSS