[CCC DEV] Any thoughts on Raspberry Pi?

Matt Jadud matt at jadud.com
Thu Apr 26 00:53:56 BST 2012


On Wed, Apr 25, 2012 at 13:12, Steve Pretty
<steve.g.pretty at btinternet.com> wrote:
> I am wondering if the Occam Pi community have any plans to support the
> Raspberry pi board?

Yes. Omer has one, but he hasn't shared it with me yet, because he
claims he can't share it effectively via post and still do his job.
"Weak," I say!

(I'll get one or two ordered, but I'm about to move house and jobs in
a month... however, electronics and embedded systems are about to
become more central to my life as a member of the faculty, which is
quite cool.)

> Seems to me that boards like this could attract many more people than
> similarly priced Arduino boards (looks like there are already 350,000 on
> order - mine is in there somewhere!).

I need to join that number!

> This is an ARM / Linux environment, so the transterpreter would need to be
> compiled to work in that environment. I guess one should be able to get full
> occam pi running, as you can on a laptop.  Raspberry pi has GPIO support as
> well, so should be able to do Arduino like things with the "plumbing"
> library too.

Your intuitions are correct; the port should be relatively trivial. We
could compile the POSIX Transterpreter directly on the machine itself,
and then provide an interface layer (either in C or in o-pi) that
talks to the hardware. Plumbing programs will, essentially, be able to
be executed on the R-Pi without any real difficulty. (In fact, most of
the savvy in the Arduino port will be completely unnecessary... there
are entire abstraction layers dedicated to directly handling hardware
that we might not need, especially if we leverage C interface layers
and do most of our work through the FFI. But, having not put my hands
on one yet...)

It is primarily a matter of 1) getting one and 2) doing it. It will,
however, be far easier than supporting (say) a new bare hardware
target.

In this regard, Omer is really ahead of the curve...

http://vimeo.com/40311333

And, watching that video again makes me think that we have to get him
an "I <3 occam" t-shirt... :D

And, looking at his bindings from Erlang...

https://github.com/omerk/erl-hw/blob/master/raspberry-pi/gpio.erl

he is doing everything through the filesystem. We might provide a
minimal C wrapper, and then we can slam that into the bottom of the
Plumbing libraries. It should be relatively painless to get things
up-and-running on the Raspberry-Pi.

And... if you beat us to it, all the better! :D We'll certainly be glad to help.

Cheers,
Matt



More information about the developers mailing list