Parallel Programming For the Arduino 140
blackbearnh writes "As more non-traditional programmers start playing around with embedded platforms like the Arduino, the limitations and complications of interrupt-driven event handling can become an annoying barrier to entry. Now a group of academics have ported the parallel-processing language Occam to the Arduino. In an interview on O'Reilly Answers, Matt Jadud of Allegheny College describes how Occam helps artists using the Arduino in their installations, and how the advent of low-cost computing platforms is changing the educational experience for proto-makers in school. 'Basically, an artist or a tinkerer or a hacker has a goal. They don't really care about learning Occam. They don't care about how this language is different from C. They just want to make a cat door that keeps their cat out when the cat comes back with a mouse. Or they want to make some kind of installation piece. Trying to focus as much on the user and the possible goals they might have is what's motivating our work right now.'"
Python alternative (Score:1, Informative)
Or try PyMite a.k.a. Python-on-a-chip or p14p [google.com] if you really must... Also features threads and is a little more mainstream than Occam. And people do actually care about the amount of mental capacity goes to their tools while making the cat door open and close.
Re:Keep a cat out when it has a mouse?? (Score:2, Informative)
Re:Is that this language that looks like Python? (Score:2, Informative)
Re:Propeller Chip (Score:3, Informative)
After all, it's a microcontroller
You italicized the wrong syllables. Should have said microcontroller as it can only parallelize separate hardware threads. You can't, for example, do more than eight software threads.
Here's a mixed model fail for an four person soccer video game:
one cog runs the video out (hardware, OK)
one cog runs the sound out (hardware, OK)
one cog each for each human player, reading each joystick or bluetoothed wiimote or whatever (hardware-ish, OK)
one cog each for each computer controlled AI player (software, danger! danger! danger!)
That adds up to 10 cogs. And success or hard failure depends on a user configurable number of players due to inherent hardware architectural limitations.
A better architecture in this situation would be scrap the hardware accelerated threads and go pure software threading, since none of the threads (well, except video) are terribly computationally difficult.
Also note that lynxmotion sells numerous little robots with up to 32 little servos. Easy if your threads are done in software, not so easy if they are only done in hardware and you only get 8 or whatever.
Re:Keep a cat out when it has a mouse?? (Score:3, Informative)