[C.CC USERS] More on servos

Matt Jadud jadudm at gmail.com
Mon May 3 02:18:10 BST 2010


On Sun, May 2, 2010 at 8:55 PM, Dennis Meade <stone.misc at gmail.com> wrote:
> If using FFI or SWIG is acceptable, I believe it would be fairly easy to

FFI is absolutely acceptable when there isn't a better way. I suspect
the VM on the Arduino is a bit too slow for what you're trying to do.

The Arduino wrapper has an FFI table with... one function? You
probably don't need SWIG to generate the FFI, since you're probably
only talking about one or two calls. I haven't seen the code, though,
so I don't know if there's a "pure occam" approach that will work or
not.

Note that including all of the C/C++ code from the Arduino libraries
is something we're avoiding doing. We started there (when we were
exploring), and slowly stripped it away. So, an FFI call (or two) that
do exactly what you need is the way to go.

Also note: C FFI calls should be quick: you want to get back so the
scheduler can keep doing its job.

> I would be more than happy to provide any code that might be useful.

Any and all is useful. Certainly, we can help more when we see what
you're up to.

> One other thing, is there support for I2C in the Arduino version of
> occam-pi?

A general I2C library is roughly #1 on my list for summer hacking.
Anyone who gets there before me wins. However, I want/need it for work
we're doing this summer, so it will get done.

Two more days of class...

Cheers,
Matt




More information about the users mailing list