[C.CC USERS] wiring.module Question

Matt Jadud matt at jadud.com
Thu Oct 27 01:15:03 BST 2011


Hi Aaron,

On Wed, Oct 26, 2011 at 17:33, Aaron Ryan <bringfire at gmail.com> wrote:
> Thanks for the zip file and the heads up about the wiring.module and its
> tendency to foster a procedural rather than parallel mode of thinking with
> Occam-Pi.  My first question then, is how to go about reading and printing
> analog values using the Transterpreter.  The code for reading which you
> provided is a good start

Although we haven't really discussed it, I've made some changes to
``the book.'' By "changes" I mean "I left everything as-is, but
created a new outline that doesn't contain any of the old material."
Mostly.

Instead, I've started looking at the Arduino Cookbook, and am going to
write material that (roughly/mostly) follows that outline. This will,
I think, be useful in several ways:

1. It will help my students. They're going to be diving into occam-pi
on the Arduino, and they're already experienced with both Java and
Scheme. They don't need me to walk through syntax in great detail, but
they do need to know how to ``do stuff.'' The cookbook will work for
them in this regard.

2. I've had a question or two off list from people who don't know how
to proceed from the book as it stands---it doesn't get very far. This
is especially the case with people who have prior programming
experience and/or experience with the Arduino. In this regard, they're
like my students.

3. It isn't a good framework for documenting answers to questions like
you just asked. It's a simple question... but I couldn't add it to the
book ``as was.'' It would require chapter after chapter of lead-in
before I would get to the point that I could (naturally) answer your
question in context. A cookbook allows me to throw it in where it
makes sense, and move on.

Some of this could be addressed by improving our WWW infrastructure
(so it was easier to write this kind of content quickly, and have it
typeset reasonably correctly without it being a pain). However, I
can't solve that quickly, but I can work with the LaTeX I already have
in GitHub.

So, try this:

http://dl.dropbox.com/u/473110/plumbing-for-the-arduino-20111026.pdf

This is the start of a cookbook. It has some text I started earlier
today on basic bits of the language (which is rough stuff), and I went
ahead and jumped ahead to fill in an answer to your question. If it is
adequate, good. If it isn't, ask more questions: it can become another
"chapter" in the cookbook.

The source for the book remains in GitHub

https://github.com/jadudm/Plumbing-for-the-Arduino

If everything is happy on your system, you might be able to just do a
'make'. However, it's a bit wonky.

Thoughts/pushback on this are welcome. Dave, you had wondered about
contributing to documentation: this seems like a much better way to
get people involved, as it no longer requires an understanding of a
``text'' with a narrative arch. Now, you can add in sections/chapters
as you see fit. If there's anything that you'd like to write, just
claim it.

I might break the cookbook out into a new repository (as it is
different from the book-that-was), but probably not for a day or two.
I'd mostly appreciate thoughts/feedback at this stage.

Cheers,
Matt



More information about the users mailing list