texy said:
This is the kind of stuff I would also like to do, so looking forward to your published code. I have built a few arduino projects of my own, but am a Linux newbie. I am also keen to learn Python, and disappointed that the hardware level coding has so far been done in C, and not the prefered RPi programming language, however there may be technical reasons why C has had to be used.
In the mean time I have dedicated a spare hard drive in my main PC and installed Debian on it to play around with. Which Basic are you using, so I can play with your code?
Texy
I wrote my own BASIC... (In C). I'm in the process of tidying it up and will publish it all under GPL soon - and provide binary Debian packages for both i386 and ARM.
The Arduino interface is all done & tested now too, so Basic & C programs can poke commands at my Arduino and it then emulates the Arduinos 'Wiring' library to do things like DigitalWrite, AnalogueRead and so on. And if I have interpreted correctly what I've seen of the Gertboard and Gerts postings here, then I think I have a pretty good idea of how I can integreate that into my system too in a fairly seamless manner. My plan is to publish all my Arduino code too, however I don't use the Arduinio IDE, so will publish HEX files for the images for those that can't compile it the old-fashioned Makefile way!
I don't see why my libraries won't be callable from other languages too - but I've no idea (nor not much interest) how Python does it all, but I'm sure it's fairly easy to integrate a new function or Library (written in C) into Python if needed - and that function can be written in some language that does allow hardware access, so GPIO access from Python ought to be very possible. (And I'm sure Serial port access is already supported)
Actually, thinking about it now, it probably wouldn't be too hard to write a Linux device driver for it all, then simply open the device and send controls to it in a fairly standard manner - do-able from most high level languages including Python, I'd have thought. I don't have the resorces at the moment to do this though - maybe when I get hardware myself though.
A quick piccie of a BASIC test program, talking to an Arduino:

the bar-graph at the bottom is reading a potentiometer, showing it set to 26%, the circles are the buttons - the blue one was pressed, temperature is from an LM35 on an analogue input. The program also updates the potentiometer on a set of LEDs on the board itself (see an earlier post for a picture of the test board).I must investigate videos - one of these days!
If you want to look at the BASIC program that generates this, then it's
http://unicorn.drogon.net/ardu3.rtb.txtGordon