This book is all about Programming the Arduino. I wrote it to try and respond to the many problems that come up on the Arduino forums about how to program an Arduino. The book does not assume any prior knowledge about programming or experience of electronics.
At the start of December 2011 Arduino 1.0 was released. This changed a few things, that have caused two of the sketches in this book not to work.
If you are using Arduino 1.0 and have not used any previous version of Arduino, you need to:
Download the new versions of sketches 10-01 and 10-02 from the Download Code link at the top of this page. The classes Server and Client have been renamed to EthernetServer and EthernetClient.
If you are using Arduino 1.0 and have used Arduino 023 or earlier, you may need to:
get version 1.6 of the Bounce library from http://www.arduino.cc/playground/Code/Bounce
Page 3. Figure 1.1 marks one of the mounting holes as being the reset button. The reset button is actually slightly below it and to the left just above the label ‘Reset’ on the board.
Page 4, 2nd paragraph under Power Connections, 3.5V should be 3.3V in list of power pins.
Page 7, 2nd paragraph under The Origins of Arduino, … such clones often have “*dunino” names should be “*duino” names.
Page 19. I state that the serial port is always COM3. This is not the case – usually it is COM4.
page 33 paragraph 6 last sentence. The value returned to use from the call would be the sin of the angle passed as its argument. Should be: The value returned to use from the call would be the sine of the angle passed as its argument.
page 36 last paragraph last sentence int ledPin 13; Should be: int ledPin = 13;
Page 40. I say that to convert C to F you ‘to multiply it by 5, divide by 9, and then add 32′. This is the wrong way around. It should say ‘multiply it by 9, divide by 5, and then add 32′
Page 44. The sentence: ‘We used the symbol <, which means less than’ should read: ‘We used the symbol > which means greater than’.
Page 47. Near the top of the page. ‘less than 100′ should read ‘less than 20′.
Page 61. “-” missing on p61 table 4-1 for “long’ types (2,147,483,648 to 2,147,483,647) also on page 61, last sentence of first paragraph in section Other Data Types: “numbers between -32767 and 32768″ should be “numbers between -32768 and 32767″ so that it agrees with Table 4-1.
Page 69, Figure 5-1, the first 6 lines of the output is shown as 200, while only the first 3 lines should be 200 (should be 3 lines of 200, 3 lines of 500, 3 lines of 200 – 9 total output lines, not 12 output lines).
Pg.75. Table 5-2. “D” is shown as “..” should be “-..”
Page 120. The example code for writing a string in Chapter 8 does not write the terminator. It should look like this:
char *test = “Hello”;
int i = 0;
while (test[i] != ‘\0′)
Page 121. There was a semi-colon missing on line 7 of sketch 08-03. This is fixed in the current download of the sketches.
Page 121. Also in this sketch, for (int i = 0; i < 1023; i++) should be: for (int i = 0; i <= 1023; i++). That is <= rather than <. As it stands the sketch would not clear the last byte.
Page 149, 1st Paragraph, “Type the flowing into the sketch …” should be “Type the following into the sketch …”
Page 121. The sentence at the end of the page that says ints and floats are both 16 bits should say that ints are 16 bits and floats 32 bit.
Following problems with legibility of some of the screen shots on some eBook readers, here are the images.