[squeak-dev] Talking to the real world from Squeak on a Rasppi

tim Rowledge tim at rowledge.org
Fri Apr 11 16:29:55 UTC 2014


On 11-04-2014, at 7:23 AM, Herbert König <herbertkoenig at gmx.net> wrote:

> Hi,
> 
> how do I use the camera and do IO on the Pi from Squeak?
> 
> I managed to connect two Squeak images on the Pi via UDP so I think I could write (copy :-)) some python to do the IO and talk to Squeak via sockets.
> 
> Are there alternatives? Plugins? How does Scratch do it?

Scratch uses the CameraPlugin and on a Pi with the latest v4linux stuff it works *but* (in Scratch at least) the colour map is wrong. I haven’t put any serious effort into it but I think it is swapping R & G - so think BGR instead of RGB. There ought to be a simple setting to switch this, apparently. I’ve also been told that v4l ought not be needed for the fairly simple work the CameraPlugin needs to do.

The general case for IO - assuming you mostly mean the GPIO pins, is/will be to use the FFI stuff Doug McPherson is getting to grips with. It might be worth making a simple plugin for your specific needs if you need it now; it’s hard to know exactly how much work the ffi requires!


tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Fractured Idiom:- HASTE CUISINE - Fast French food




More information about the Squeak-dev mailing list