Go Down

Topic: BOOK: Arduino programming reference (Read 3933 times) previous topic - next topic

bwevans

Hi all,

As most already know, Ill be running an electronics/fine arts course at Cal State Long Beach in the fall. In part for this course and in part for the courseware project over in the playground, Ive been working on compiling a simple 'notebook' reference for the Arduino/C programming language. Something like a companion to the other sources beginners use to learn to program the Arduino. The idea is to publish it through Lulu for the cost of publishing (under $6) for a nice 40page 6x9 saddle stitched book or as a free pdf, both under the CC license.

Ive used the reference section here on the Arduino site as the 'core' to this new book. Weeks of editing, adding, and rewriting ensued to make everything as succinct and uniform as possible. I am now ready to release it as a beta to get comments, feedback, and criticisms from the community before I proceed to publish it. I have tried to credit everyone I can so if I missed someone let me know. I will hold off publishing on Lulu until I get back from a workshop in Colorado in mid August, which gives me some time to walk away a bit and then incorporate any changes that might be suggested.

Ok, enough yabbing, heres the link to the PDF:
http://www.csulb.edu/~bevans2/arduino_notebook_v6beta.pdf

Cheers!
Brian

David Cuartielles

Hej Brian,

I am happy to see you came along with such a good collection of material, I will post my comments here:

1) It is clearly a programming reference, therefore a more suitable title would be "arduino programming notebook", this would leave space for other people to write other notebooks with the same form "arduino sensor notebook", "arduino project notebook", etc

2) Hernando's family name is "Barragan" and if you want to be writing in perfect Spanish "Barragán" (note the accentuation in the last "a")

3) I think that for v0002 of this booklet it could be interesting to add one appendix in using libraries, it is one of those basic functions in code that are always hard to grasp at first, but very useful for beginners

4) even more important than libraries are functions. The use of functions is always very needed. I like to explain how to merge two programs, place all the code in one single setup and in one single loop, making the second program into a function. This helps people to understand that "void" in front of "setup" and "loop"

Thanks for the good work, I will use this one in my classes for sure ;-)

/d

PS. can we get access to the source file to make a translation to Spanish?

mellis

Yea, very cool.  It's great to have the reference material collected so nicely into a printable form.

wandrson

Great idea!

A couple of comments.

In the appendix, I would place notes/additional schematic on the two digital output functions about hooking up inductive loads such as motors or relays.  Including diode protection to prevent frying chips.

You want to think about including advanced tabs in the booklet that talk about bit math, port manipulation, and maybe PWM with references to the data sheet and a couple of examples.  Not sure about your audience but these may help introduce those students who are interested into a more general AVR programming with C.  And it can prove useful to normal arduino activities when you need to change more than one pin at the same time.

Finally, I would include some web addresses in the appendix for where to find devices, arduino.cc, forum, etc...

Daniel

#4
Jul 18, 2007, 09:23 pm Last Edit: Jul 18, 2007, 09:58 pm by Daniel Reason: 1
Hi

nice work! This is really interesting to see, as it mans that an open-source project like Arduino will soon have documentation similar to or equivalent to the leading commercial product in this area, the Basic Stamp. That a project without any employees could create something so big is really a significant accomplishment.

That said, I agree that it is really a beginning programmer's reference rather than a guide to the the entirety of approaches to the Arduino. A few suggestions:

- Pictures for the tutorial pages. The schematics are really great, but reading schematics for beginners is sometimes a bit of a conceptual leap. As Tom Igoe has shown so well, photo plus schematic plus code activates the learner on the visual, tactile and reading levels. Everyone learns differently; one educational theory called VARK proposed that there are four modes: visual, aural, written and kinaesthetic ( i.e. doing). With pictures added to what you have, the only learning mode missing is aural-- i.e. someone there to actually explain it in words.

- A bit of an introduction. If this is programming-centred, then perhaps there should be more of an intro to programming structure than there is now.
If it is to be a bit more hardware-centred, something like Jim Campbell's model for interactivity would be really good. See this page. He is very non-proprietary about his designs; if you asked him you could probably just copy what he has there.

- Examples. It never hurts to throw in a photo or two of a completed project, so that the highly technical aspects of doing this kind of thing are punctuated with a project that gives the reader an idea of the possibilities of the knowledge they're acquiring.

- Plain-language headings. When someone sees the word "structure" all by itslef, their mind looks for their current knowledge on the work-- they try to associate it with a meaning. The headings should perhaps then be more explanatory, as in "the structure of Arduino Programs". With so many "variable", i.e. new words and concepts for the beginner to learn, it pays to make the explanation simple, so that the learner can more precisely on the subject.  For example, "int  the integer variable" is more efficient at communicating the topic than plain "int"

Anyway, this must have been a huge effort, and you are to be congratulated... you get the Programmer is responding trophy.  

Best

Daniel


PS: I added a "manuals" page to the Playground...  

bwevans

#5
Jul 19, 2007, 04:11 am Last Edit: Jul 19, 2007, 04:15 am by bwevans Reason: 1
Thank you all for such a warm reception. It did take an insane amount of work for just such a simple idea! (Dont most things?!)  Lets see if I can address some of the thoughts here....

First of all I had to make a lot of 'executive' decisions about what would or would not be put in there. I only have so much time to put this together and there can only be so much taught in a 1 semester class. (An unfortunate back injury meant I had 4 weeks lying on the couch to type and edit!) So from my perspective I will be workshopping the material with my students and a day later they will invariably need to be reminded of whether pin or value came first in some command or what a semicolon does. And that is the role of this reference: to fill in the gaps of other resources.

For my class it will be a compliment text to Igoe's Physical Computing and both will be used throughout the class. Phys Comp will cover the bulk of the hardware and concepts while this covers only the basics of the software. With that said I dont think that is much different for most people just starting out. When learning something new, you often collect together as much info from as many angles possible. At least I do. And thats tricky here. I really think taking a class or a workshop is the best way to get started. Direct contact with another human is a good thing. I dont know, but maybe it was intentional not to include the kitchen sink?

I have made the change to Hernando's name, and will consider changing the name of the booklet. It makes sense. I have relooked at the section on Functions and have found some changes to make that will work better (incl. passing values to the function). An appendix on other libraries makes sense too.... maybe later on. When I get back in mid-August I will also look at adding some photos to the appendix section to flesh out the schematics. I would be doing that when presenting to class anyway so it might as well be in the book.

A lot of the other suggestions for more material make sense too but as I was telling Daniel that that begins a whole other project. I would love to one day write that 300 page book that fuses fine art and design with electronics and programming. Sort of Physical Computing crossed with a Christiane Paul's Digital Art. I dont have the time (or the publisher) to do that at the moment. I will keep this fluid though, starting by adding an appendix or two when I get the chance. I can also revist it easily enough as the semester progresses. Ive taught this class before using another micro so it will be interesting this time with the Arduino. Im sure to learn more as I go along.

Thanks again and Ill gladly listen to anything else anyone has to offer.
Cheers,
Brian

//EDIT
I would also like to say I did not intend to replace the reference section here on the website. What is here is great, and from my experience, must have taken quite a few man hours. So what is missing in this version can easily be had by the beginner by simply coming to arduino.cc and starting there. I hope that makes sense...

agent_orange

#6
Jul 20, 2007, 04:24 am Last Edit: Jul 20, 2007, 04:32 am by agent_orange Reason: 1
The book looks really good. Congratulations. I know how much work you must have put into it. It would be great if a lot of the arduino knowledge could be collected and written up in this fashion.  If the book was quite complete it could be made available as a download and people could get it printed and bound at a printers. It could also be offered as a bound and printed book which people could buy (for and example of this see the Blender open source software www.blender.org, they've released a number of books)

Cheers

Carl R

This is from a while back, but is a wonderful introduction to the arduino language, and is free for download.

-cr

Grumpy_Mike

Sadly the link now appears to be dead.  :(

gelfling6

#9
Nov 07, 2010, 09:03 pm Last Edit: Nov 07, 2010, 09:04 pm by gelfling6 Reason: 1
this new link points to LULU, which has the downloadable PDF (See the blue (DOWNLOAD)) or purchasing the printed for under $6 (USD)

http://www.lulu.com/product/download/arduino-programming-notebook/3524028

Just downloaded the copy right now, 36 pages. And already putting it to use!   8-)

Reboticon

Wow this is invaluable for beginners. It should be added to the links page..

Thanks OP for the work!

Go Up