Just catching up with some of the posts here - All the "watches" I set on the old forums didn't get carried over (due to some pretty good reasons, I'm sure!)
So in recent weeks, more people have been poking the GPIO, and waiting patiently for the Gerboard. I'm quite excited about it, from looking at the photos, reading and so on.. Meanwile, I've done lots of fiddling with the Pi and its GPIO, trying not to break it (too much!) - e.g. here is an SHT15 temperature/humidity sensor connected up, dispalying the temperature in binary:
But back to the GPIO - The Pi is the first Linux box I've had which has had GPIO - well, not quite, but it's the first that's had the GPIO stuff in the kernel "proper". I've used embedded Linux boxes where you just poke memory mapped addresses to control hardware, but the designers never put anything in the kernel for it... So when I first saw Gerts code which had (I think) Dom's low-level mmap stuff in it, I poured over it with relish and wrote my own interpretation and produced a C library to play with it and hooked it into my BASIC - I also decided (rightly or wrongly) to mimic the Arduino way of doing things where there is a level of abstraction between the actual hardware pins and the names of the pins in the software. This has allowed people to make different Arduinos over the years, but you know that if your code uses "Pin 11", and you connect a wire into the socket on the board marked Pin 11, that it will work and any arduino-compatable board. You don't need to know that on a Arduino Uno with a 328p processor, pin 11 is Port B, bit 3.
There are 2 down-sides to this approach on the Pi - one is that you need to run your programs as root - and this exposes you to all sorts of issues - not the least being able to crash the hardware and scribble all over memory! But the other is the mapping of program "pins" to the GPIO pins to the physical location on the hardware.
However I'm happy with this for now - and I know a few others are. I also think this might encourage some people who're already in arduino-land to come to the Pi... Or at least give them something familiar to work with initially, and especially now knowing that the Gertboard has an ATmega chip on it - which I'm sure will attract Arduino fans to it too. I've done a lot of stuff (mostly for fun) connecting my Arduinos to my Pi via serial port - looking forward to having it on one nice board for experimentation.
But it's not the Linux/GPIO way I hear you cry!
And you're right, it's not, but hey, this is a Raspberry Pi, it's not a beagle/panda/random animal board, or any other ARM based system and if/when the Pi Rev C/D/E comes along and it has different GPIO pins brought out, then it's not going to be hard to augment the mapping to hopefully keep things sane.
But it's not the Linux/GPIO way I hear you cry! (again)
Yea, OK. So what I'm looking at now is offering it both ways and using both the mmap method (seriously fast), or the /sys/class/gpio/ way (dull, but shrewd) so in my code you'll be able to write to pin 1, or write to GPIO18.
In either case, you'll still need to be root to expose the GPIO pins to userland via writing the right stuff into the /sys/class/gpio/export control file. (Which I think I'll implement as a setuid type program - might well be the easiest way!)