By Developers, For Developers

Historical errata for Arduino

PDF PgPaper PgTypeDescriptionFixed onComments
65TYPO

I believe the binary value of 3 is actually 011, not 110.

2010-06-04
79ERROR

“After you’ve uploaded the software to the Arduino, start the IDE’s serial monitor. It will print the current value of the guess variable every two seconds.”

Actually, with the given code the current guess value is printed as rapidly as possible.

2010-07-05
84ERROR

Figure 4.3: The PING))) Basic Circuit seems to have incorrect wiring: Arduino 5V is connected to PING))) GRD. Arduino Grd is connected to PING))) SIG. Arduino Analog 0 connected to 5V. Even if the orientation of the PING))) is flipped, these connections don’t seem correct: The text says the signal connection is to Digital Pin 7.

Recommend you correct the wiring and explicitly show/tell which direction the PING))) is pointing it’s sensors (toward or away from reader).

2010-07-08Thank you very much for pointing this out, James. I have fixed the diagram.
18TYPO

Under 1.1 What You Need, the last point is, “The Arduino IDE (see Section1.3, Installing the Arduino IDE on Windows, on page 23).” Should drop “on Windows” and be, “The Arduino IDE (see Section1.3, Installing the Arduino IDE, on page 23).”

2010-07-14
30SUGGEST

Under 1.5 Compiling and Uploading Programs, at the end of the third paragraph, the USB ports on your computer are countable, so “number” should be used instead of “amount”.

So “or something similar depending on the amount of USB ports your computer has.” should be “or something similar depending on the number of USB ports your computer has.” or “the number of USB ports on your computer.”

2010-07-14
34TYPO

A misplaced comma, “You’ve written some code ,and it makes the world a bit brighter.” should be “You’ve written some code, and it makes the world a bit brighter.”

2010-07-14
72ERROR

In 3.6 Adding Our Own Button, the text describes connecting a button to pin 5, but the code still references the button on pin 7.

2010-07-14
83TYPO

Under 4.2 Measure Distances with an Ultrasonic Sensor, there’s an extraneous “it”, so “and it we use it directly with a breadboard,” should be “and we use it directly with a breadboard,”

2010-07-14
88SUGGEST

When talking about programming best practices, Processing and Java are mentioned, but no mention of Processing has been made yet (except in the contents and under “What you need”), and all the programming has been C. I suggest a forward reference to 4.5 Transferring Data Back to Your Computer Using Processing would be appropriate here.

2010-07-14
90TYPO

As with #44044, microseconds are countable, so “number” should be used, “the amount of microseconds” should be “the number of microseconds”.

2010-07-14
46TYPO

As with Beta 3 bugs abount countable things, “returns the amount of bytes” should be “returns the number of bytes”.

To save on open issues, also:

  • page 92, “specify the amount of decimal digits” -> “specify the number of decimal digits”
  • page 98, “determine the amount of milliseconds” -> “determine the number of milliseconds”
  • page 114, “mainly differ in the amount of space axes they support (usually two or three)” -> “mainly differ in the number of space axes they support (usually two or three)”
  • page 120, “the amount of axes we are measuring” -> “the number of axes we are measuring”
  • page 145, “returns the amount of bytes that are available on the data bus” -> “returns the number of bytes that are available on the data bus”
  • page 149, “expects the maximum amount of samples” -> “expects the maximum number of samples”
  • page 169, “amount of unread e-mails” -> “number of unread e-mails” twice in the info box.
  • page 178, “append the amount of movements we’ve detected” -> “append the number of movements we’ve detected”
  • page 212, “contains the actual amount of people on the team” -> “contains the actual number of people on the team”
  • page 212, “calculate the amount of team members” -> “calculate the number of team members”
2010-07-16
120TYPO

The code listing defines NUM_AXES, but the text below incorrectly talks about AXIS_AMOUNT.

2010-07-16
77ERROR

The code for BinaryDice/DiceGame/DiceGame.pde keeps sending “Guess: 0” as fast as it can back down the serial line. It would be better if it only sent the guess number back when a guess was actually made.

That can be simply achieved by tweaking handle_guess_button and making the second if statement wrap all other code in the function.

Currently looks like this:
void handle_guess_button() {
if (guess_button.update())
if (guess_button.read() == HIGH)
guess = (guess % 6) + 1;
output_result(guess);
Serial.print(“Guess: ”);
Serial.println(guess);
}

Should look like this:
void handle_guess_button() {
if (guess_button.update())
if (guess_button.read() == HIGH) {
guess = (guess % 6) + 1; //

2010-07-25Thank you very much for this improvement, Richard! I have changed the code, the text, and the screenshot. \n
48TYPO

In the last line of the “grey-boxed note”, a word or words are missing between “is” and “way”:

This technique is called cross-compiling and is
way to program embedded devices.

2010-08-09
55TYPO

‘To quit the screen command, press Ctrl-A followed by Ctrl-\\’

At least in Ubuntu 10.04 to exit the screen command is:
control-a followed by k

also, instead of using the serial number, can’t you use the usb port of the arduino?
For instance, screen /dev/ttyUSB1 9600

Great book!

2010-10-05Hi David! \n \nThank you very much for your suggestions! \n \n1. Ctrl-a Ctrl-\\ closes all screens while Ctrl-a Ctrl-k closes the current screen. I now use Ctrl-a Ctrl-k. \n \n2. I have added more references to /dev/ttyUSB. \n \nThanks again!! \n \nMaik \n
87SUGGEST

At the top of the page you remark:
‘Now open a new tab and when asked for the file name enter telegraph.h’

You might mention that ‘new tab’ isn’t the same thing as File-> New

Opening a new tab isn’t super intuitive in the Arduino IDE since it isn’t in the menu and only available by clicking the icon on the right side of the window.

2010-08-23Hi David! \n \nThank you very much for your suggestion! You can find an explanation of the tabs popup menu in the "Inside Arduino" chapter already. But now I have also added a screenshot showing the popup menu. I hope this makes it even clearer. \n \nCheers, \nMaik \n
240ERROR

On page 239 silver denotes –10% accuracy but on page 240 silver is listed as–5%. Vice versa for gold.

2010-08-30
14TYPO

First sentence of What’s in This Book says “7 Arduino Projects”, I believe this should now say “8 Arduino Projects”

2010-10-08
25TYPO

Middle of the third paragraph of the sidebar, “The frequency we use to to determine new samples…” has two to’s.

2010-10-08
28ERROR

The Arduino disk image for the Mac no longer includes separate USB drivers for Intel and PowerPC. The installer is now a Universal binary (including x86_64) called FTDIUSBSerialDriver_10_4_10_5_10_6.pkg. This is the case in arduino_0020.dmg and arduino-0019.dmg but I believe previous versions have also been like this.

2010-10-09Matthew: \n \nFirst of all, I'd like to thank you *very much* for all the suggestions, corrections, and improvements you've sent!! I'll integrate them soon! \n \nRegarding the drivers you're right: Since version 18 it's a Universal binary. I have adjusted the text accordingly. \n \nBest, \nMaik \n
38TYPO

Last sentence of the first paragraph says “…as soon as you start mass production of an electronical device…” This should probably be just “electronic” rather than “electronical”.

2010-10-09
44SUGGEST

Last paragraph before bullet points doesn’t read well, perhaps you could consider rewriting it.

2010-10-09
53TYPO

Last sentence in “Serial Terminals for Windows” says “Now press ’1’ and ’2’ a few times to switch on an off the LED” should be “on and off”.

2010-10-08
56TYPO

Last bullet starts “A UART (Universal Asynchronous Receiver/Transmitter).4 supports…” The period after the closing bracket should be removed.

2010-10-08
65ERROR

The resistor in figure 3.4 looks wrong. On the previous page you introduce the resistor to limit current, however, the text doesn’t explain where to connect the resistor and the photograph appears to show the resistor being shorted by the breadboard, it looks like it is plugged in to a single column of the breadboard. I assume the photo should probably look the same as the diagram in figure 3.6 on page 67.

2010-10-10
60TYPO

In the last bullet on the page there is a space between 10k and the omega symbol. This seems to occur on a number of pages 61, 64 etc. On page 64 it says “1k ohmresistor” without a space between the omega and resistor. I assume that this issue will occur throughout the book.

2010-10-09Good catch, but the space is there for a reason. In the epub and mobi versions of the book we cannot use an Ohm symbol and have to write the text "Ohm" instead. So 1kΩ would be rendered as 1kOhm. \n
64SUGGEST

First paragraph of section 3.3 starts “Up to now, we used the LEDs that come with the Arduino board and…” This could probably be rewritten as it sounds like we have been using external LEDs that came in a kit with the Arduino board rather than the LEDs that are installed on the Arduino board.

2010-10-09
64SUGGEST

Second last sentence of the second last paragraph could do to be rewritten, lots of what’s, “Make sure that you still know what the negative and what positive connector is after you have shortened them.”

2010-10-09Now it's "Make sure that you can still identify the negative and the positive connector after you have shortened them.". \n
101TYPO

“A TMP36 temperature sensor from Analog devices.” Devices should be capitalised as it is part of the company name.

2010-10-09
17TYPO

“TMP36 temperature sensor from Analog devices” should have a capitalised Devices because it is part of the company name.

2010-10-08
19TYPO

First bullet point, Analog devices should have a capitalised Devices because it is part of the company name.

2010-10-08
64SUGGEST

At the bottom of the page you direct the reader to Section A.1 to learn more about resistors. I think now might be a good time to direct the reader to the section on identifying resistors using the colour bands.

2010-10-09
68TYPO

First paragraph, “To emulate such dice exactly with an electronics device you’d need…” I think it should probably just be “an electronic device”.

2010-10-09
72TYPO

Last sentence of the second paragraph “This initialization value is called random seed,” should probably be “called a random seed”.

2010-10-08
73ERROR

I think the third paragraph is wrong. The explanation for why there is a resistor isn’t correct.

It says that “when the button isn’t pressed, it would be directly connected to ground and would flicker due to static and interference.” This is incorrect, if the pin is tied directly to ground it will always be LOW and won’t “flicker”. The pin would “flicker” if the pin was left floating, connected to nothing. The resistor is used because when the button is pressed 5v is applied to the pin, if the pin was also tied directly to ground there would be a dead short without the resistor.

I think you are getting confused between floating pins and pull down resistors. If the pin was connected only to the 5v line with a switch that is either open or closed you would get the “flicker” when the switch is open because it is floating. You would get a HIGH when the switch was closed because the pin is tied to the 5v line. When the switch is open you could get either a HIGH or a LOW because of the “flicker.”

I hope I have made myself clear.

2010-10-10
75SUGGEST

Perhaps it would be good to get the reader to run a couple of sketches that demonstrates the problem of bounce before you then go on to solve the problem.

A program that would supposedly toggle the state of a light after each press of the button should, hopefully, demonstrate erratic behaviour due to over sampling the button state and also the bounce.

Something like (this was written without an Arduino handy so forgive me if it doesn’t work as written):

const int BUTTON_PIN = 7;
const int LED_PIN = 13;

void setup() {
pinMode(LED_PIN, OUTPUT);
pinMode(BUTTON_PIN, INPUT);
}

int led_state = LOW;

void loop() {
const int CURRENT_BUTTON_STATE = digitalRead(BUTTON_PIN);

if (CURRENT_BUTTON_STATE HIGH) { led_state = led_state LOW ? HIGH : LOW;
digitalWrite(LED_PIN, led_state);
}
}

This would toggle the state of the LED while the button is depressed and would leave it either on or off when the button is released. You could then attempt to “fix” this by adding state to only change the LED state when the button state toggles. Something like:

int old_button_state = LOW;
int led_state = LOW;

void loop() {
const int CURRENT_BUTTON_STATE = digitalRead(BUTTON_PIN);

if (old_button_state != CURRENT_BUTTON_STATE && CURRENT_BUTTON_STATE HIGH) { led_state = led_state LOW ? HIGH : LOW;
digitalWrite(LED_PIN, led_state);
}
old_button_state = CURRENT_BUTTON_STATE;
}

You would then be left with the issue of bounce which would need to be fixed with the addition of a delay.

This would allow you to introduce storing the simple state of the LED before moving on to the addition of delays and previous state.

I think understanding bounce is quite important and I think it would be good to demonstrate it to the reader rather than saying there is a problem and immediately providing the solution.

Hopefully you understand my point!

2010-10-15Matthew: \n \nThank you very much for this suggestion! I have added it to the section about debouncing buttons and your code examples worked out of the box! \n \nBest, \nMaik \n
79ERROR

End of second paragraph says “This time we’ve connected it to pin 7.” Pin 7 was used for the previous button, from the code and photograph it should be pin 5.

2010-10-09
79SUGGEST

First sentence should probably be rewritten.

2010-10-10
84SUGGEST

First paragraph says “When cutting the connectors, wear safety glasses to protect your eyes!” This should probably be mentioned earlier, mentioning it in the what to do if things go wrong section could end up being ironic.

2010-10-10
87TYPO

The “#ifndef” in the code listing has weird syntax highlighting, the “#if” is brown and the “ndef” is blue. Is this correct?

2010-12-13
90ERROR

At the end of the paragraph you say “Everything works exactly as described in the Morse code timing scheme…” This is not technically correct.

The output_symbol method adds a dit delay to the end of every symbol that is output. In send_message you separate letters with a dah delay but output_symbol has already delayed for a dit and you ultimately delay for 4 dits.

The same problem occurs for the word break delay. send_message delays for 7 dits meaning the delay is actually 8 dits.

I realise this is nit picking but it is incorrect behaviour.

2010-10-10Matthew: \n \nThank you so much again!! \n \nI have fixed it, so the number of dits should be right now! \n
96TYPO

Final line on the page says “Figure 4.2 shows how the final directory layout should look like.” This doesn’t quite read correctly although it is understandable.

2010-10-10
98TYPO

First bullet point says “see Figure 4.3, on the preceding page to see how it looks like” but doesn’t read very well.

2010-10-10
98TYPO

End of second bullet says " By default that would be a LedDevice, but it could as well be a SpeakerDevice." This doesn’t read very well.

2010-10-09
98TYPO

Last bullet point says “Let someone else type some messages into the serial terminal and try to recognize what he or she did send.” “Did send” sounds a bit odd perhaps “sent” would suffice.

2010-10-09
111SUGGEST

Also pages 113, 116, 174, 175, 180, 181

Celsius should probably be used instead of centigrade which has been deprecated since 1948.

Just a suggestion :)

2010-10-09
108TYPO

First sentence of section 5.3 says “According to the specification the PING))) sensor outputs…” There should probably be a comma between “specification” and “the PING(((”

2010-10-09
111TYPO

The URL in the footer is not wrapping and is clipped on the right side of the page.

2010-12-14
111TYPO

Last paragraph says “it changes the voltage on its signal pin analog to the current temperature”. “signal pin analog” doesn’t make sense perhaps it should be “analog signal pin”?

2010-10-10
119TYPO

Second last paragraph, “computers and electronics devices” should probably just be “electronic devices”

2010-10-09
120TYPO

“Using Processing as the basis for the Arduino project not only provided a good and well-tested IDE for free.” Sounds like there should be a “but…” or something at the end of this sentence. Perhaps removing “not only” would make it read better.

2010-10-09
120SUGGEST

First paragraph of section 5.6. It might be worth explicitly saying that we are starting with a Processing class in the Processing IDE as it is otherwise ambiguous.

2010-10-09
126TYPO

“In line 5 we create a new Serial object that is bound to our application (that’s what this is for), uses the serial port we’ve got from the list of all serial ports, and has a 9600 baud rate.” doesn’t read very well. “uses the serial port” should probably be “using the serial port” and “has a 9600 baud rate” should probably be “and using a 9600 baud rate” or “with a 9600 baud rate”.

2010-10-09
126TYPO

Last sentence of the first full paragraph should probably start “If you’d like to communicate” or “If you would like” rather than “If you like”

2010-10-09
126TYPO

Last paragraph, “We use it in line 30 to split the line of text we get from the Arduino at the comma (trim() removes trailing and leading whitespace characters.).” should have the fullstop removed from within the brackets.

2010-10-08
131TYPO

End of the second paragraph. It is bad form to start a sentence with “because”. Perhaps something like “The popularity of these devices mean that they’re cheap.”

2010-10-09
131SUGGEST

Final sentence says you can see the result of adding the header to the breakout board on the left of figure 6.2. The board on the left is clearly different to the board on the right. I would suggest either a new photograph or changing the wording to identify the board on the left as similar to the one on the right.

2010-10-09
136TYPO

First paragraph of section 6.4. There should be a period between “…output values correctly” and “In this section…”

2010-10-08
139TYPO

Second paragraph of section 6.5 starts “That’t how it looks”

2010-10-08
140ERROR

The button in the diagram is connected to the positive and negative rails of the breadboard but these aren’t connected to the Arduino board.

2010-10-09
160TYPO

Weird syntax highlighting of the “#ifndef”, the “#if” is brown and the “ndef” is blue.

2010-12-13
198TYPO

In the last paragraph before section 8.9 it says the next chapter will be about motors and moving physical things. I assume the Universal Remote chapter has been added since this was written as this is the next chapter.

2010-10-20Your assumption is correct. I have fixed it. \n \nBest, \nMaik \n
209SUGGEST

The resistor in the diagram doesn’t appear to be plugged in to the breadboard properly.

2010-10-20Thank you very much! \n \nI have redrawn this diagram and now the resistor is plugged in correctly. \n \nBest, \nMaik
218TYPO

The URL is not being wrapped very well and is going off the side of the page.

2010-12-14
218SUGGEST

The last sentence of the third paragraph is a bit confusing. “…we have to turn the bit length and the value of the code into int and long values before using atoi() and atol().” It sounds like we have to do the conversion before calling atoi/atol rather than using atoi/atol to do the conversion.

2010-10-20I have split the sentence into two. \n
195TYPO

“email relay” is misspelled

2010-11-17
71SUGGEST

I would like to understand why it’s a 1 KiloOhm resistor rather than a 5 ohm resistor. Could you explain?

2010-11-26We have to use a resistor to protect the LED (see Appendix A for a more detailed explanation and to learn how to calculate the right size of a resistor). I've chosen 1 kOhm, because that's the size of the Arduino's internal resistor connected to pin 13. Depending on your LED's data sheet you might be able to use a smaller one.
88TYPO

The text for a losing message in the handle_start_button function is written as “You loose!”. It should be “You lose!”

2010-11-28
91TYPO

In the exercises, the following sentence seems to be missing the word ‘see’:

“Can you the difference in brightness?”

2010-11-29
69ERROR

The description on pg.69 does not match Figure 3.4. Your text describes connecting pin 13, but the photo shows a connection to 5V. Also, when you go on to describe and “alternate” wiring in Figure 3.6, using a jumper across the center, but Figure 3.4 already uses the same kind of jumper. Figure 3.4 is described as “our final circuit”, but that clearly cannot be the case, since the LED would be on steady rather than controlled by pin 13.

2010-11-29
49-50SUGGEST

It’d be helpful to point out that the LED Switch program needs to be recompiled with LED_PIN set to 12 once the breadboard version with a separate resistor is used. It took me a few minutes to realize that that was why the LED would no longer light when I changed pins.

2011-03-28Hi George! \n \nThank you very much for your suggestion! You're right: I should have pointed the change of the pin more clearly. I'll do it in the next version of the book. \n \nBest, \nMaik \n
56-57SUGGEST

On p.56 switch has label “connected”. On p.57 I first imagined the connected terminals to be in the same orientation as on p.56. Then I realized that the connected switch terminals on the breadboard are on the sides, thereby delivering ground through the pulldown to pin 7 when not pushed.

Perhaps a visual change? Put label “connected” also on the breadboard picture? Rotate the picture on p.56? Add a label “push to connect”?

2011-03-28Thank you very much for this suggestion! I'll add a label in the next version of the book. \n \nBest, \nMaik \n
95SUGGEST

In HelloWorld.pde is
Serial.begin(BAUD_RATE);
missing. Serial communication does not work without it. Could be intentionally…

Regards,
Stephan

2011-03-14Hi Stephan! \n \nThank you very much for pointing this out! I've actually left out the initialization code intentionally. But you're not the only one who got irritated by that, so in another edition of the book I'll put it in. \n \nBest, \nMaik \n
74-75ERROR

I’m new to this electronics thing, so I may be mistaken but I’ve read it slowly a lot of times and I’d swear it’s an error.
The book says that a resistance is needed because without it the button wouldn’t be directly connected to ground. However, AFAICT this is plain wrong. There’s a wire from GND to one pin of the button; that pin is short circuited to a second pin which is connected to the input pin, so the circuit would be closed. The problem would arise when pushing the button, as there would be a short circuit between +5V and GND.

2011-03-28Hi Raven! \n \nYou're right: there is a "not" too much in the original sentence. It should read "But when the button isn’t pressed, it would be directly connected to ground and would flicker because of static and interference. Only a little bit of current flows through the resistor, and this helps prevent random noise from changing the voltage that the input pin sees." \n \nThank you very much for pointing this out! I'll add a better explanation to a new version of the book. In the meantime I'll create a forum entry (http://forums.pragprog.com/forums/129/topics/8798). \n \nBest, \nMaik \n
76TYPO

ouptut_symbol() is missing a key line of code that, without it, causes the sketch to “cram together” all the dits and dahs for each letter of the specified message. Thanks to the Arduino forum I learned that I needed to add the following line after digitalWrite(_output_pin, LOW); in the Telegraph.cpp file:

delay(_dit_length);

The addition of this line fixes the sketch and allows it to send all the dits and dahs as it should.

2011-03-14Hi Lawrence! \n \nThank you for pointing out this bug! You're right, the pause is missing in the output_symbol() method. The correct method has to look like this: \n \nvoid Telegraph::output_symbol(const int length) { \n \n digitalWrite(_output_pin, HIGH); \n \n delay(length); \n \n digitalWrite(_output_pin, LOW); \n \n delay(_dit_length); \n \n} \n \nThe same error appears in the alternative output_symbol() method in the Exercises section. Here it has to be: \n \nvoid Telegraph::output_symbol(const int length) { \n const int frequency = 131; \n tone(_output_pin, frequency, length); \n delay(_dit_length); \n} \n \nBest, \nMaik \n
78TYPO

In HelloWorld.pde, under setup() you are missing
Serial.begin(BAUD_RATE);
which prevents the Serial Monitor from working in the sketch. Note that it IS implemented on the next version of this project on the facing page (page 79).

2011-03-14This is a duplicate of erratum #46532. \n
74SUGGEST

As a beginner to Arduino, I would have found it helpful had you at least mentioned the information not revealed until page 74, (about header files and library files), much earlier in the book. As I worked my way through the sketches in the earlier sections you were using code statements with words not at all listed in the Reference section of the Arduino 0022 IDE’s Help menu. I wanted to know the meaning of those terms and had great difficulty trying to find out about them. Several Arduino forum members (where I sought help) kept suggesting I research online tutorials for C and C, which start the reader out immediately with code that the Arduino IDE won’t even use. So that just confused me further.

Only when I finally got to page 74 was it revealed that those code words came from all the files INCLUDED with Arduino, but hidden away in its internal libraries. If those had been mentioned up front, and also the fact that they can be read using any text editor, it would make it easier for the beginner to find out where you got the code not covered in the Arduino Reference section, and give us a chance to see it in action, which helps explain how it works.

2011-03-28Hi Lawrence! \n \nThank you very much for this suggestion. In the next version of the book I'll add some forward references. \n \nBest, \nMaik \n
96TYPO

In the second line on page 96, where you are discussing program size and memory usage affected by using floating point numbers, you have

“Uncomment line 39, and recompile the program to see the effect.”

However, line 39 of the float.pde sketch just completed is what causes the distance to be displayed as a number followed by “cm”. It is never commented to begin with, and commenting it out causes the Serial Monitor to just display “cm” without a value as each line scrolls by. To which block of code’s “line 39” were you referring?

2011-03-20I am actually referring to the line displaying the current distance, but it should be "Comment line 39 out" not "Uncomment line 39". \n \nOf course, the program will no longer work properly after commenting line 39 out, but recompiling shows how the program's size is affected. \n \nBest, \nMaik \n
51OK

The title of the Section 3.4 says “First Version of a Binary Die”. I guess you mean “Dice”, not “Die” :-)

The typo can also be found in the table of contents.

BTW the version of the book is 2010-12-20, not found in the dropdown list of the submission form.

2011-04-04People are used to saying "dice," but if it is one die, it is die, not dice. \n \nBest, \nMaik \n
119ERROR

The illustration for the ADXL335 accelerometer, as depicted in the drawing with it inserted into the breadboard, has incorrect markings for the X and Y Axes. The sensor’s X axis is parallel to the header pins, and the Y axis is perpendicular to the pins. Your drawing shows these reversed. It may be confusing when someone is first learning to use the sensor, if they refer to the drawing when tilting the breadboard for testing, instead of the actual ADXL335 sensor itself. They would be tilting the breadboard expecting one axis to change and they would be seeing the opposite axis changing in the data.

2011-03-28Hi Lawrence! \n \nYour observation is right, but I've found several different breakout boards for the ADXL335, so chances are good that readers will use one that differs from mine. That's why I've put some warnings ("double-check the pin labels on the breakout board you’re using!") into the text. \n \nBest, \nMaik \n
29OK

Paper edition, ISBN-13: 978-1-934356-66-1 p1.0 printing, Jan,2011 Version 2010-12-20
Page 29 section 2.3 Changing Preferences:
The author provides this section to educate the reader where the file ‘preferences.txt’ is found and an example of making a change. In thw Arduino software version 0022 that file is rather different and has the following heading on the top two lines.
“# !!!!!!!! UNLIKE PREVIOUS VERSIONS OF PROCESSING !!!!!!!!!!”
“# DO NOT MODIFY THIS FILE, OR DELETE SETTINGS FROM THIS FILE

The file goes on to explain further. You or the author need to assess this.
Respectfully,

Bob Burandt
bob@burandt.us

2011-06-15Hi Bob! \n \nI am also using version 22 of the Arduino IDE (on a Mac) and I could not find any warning in preferences.txt. Quite the opposite: in the Preferences menu you can find the following hint: \n \n"More preferences can be found in the file ///preferences.txt. (edit only when Arduino is not running)." \n \nThe comment lines you have posted seem to be from Processing's preferences file. \n \nCheers, \nMaik \n
76ERROR

Thanks for the awesome introduction to Arduino. So far I have really enjoyed it. I did notice one small error, though.

In section 4.5 the helper methods for the Telegraph class are provided. The error is in the output_symbol method. As written, this method will turn on the LED, leave it on for the provided length, turn off the LED, then leave it off for the same amount of time that it was on.

The problem here is that it does not conform to Morse Code as stated earlier in the chapter. For example, if you call output_code on the letter ‘N’ ("."), the space between the ’’ and the ‘.’ will be the length of a dah instead of a dit as it should be. This delay also causes the pauses between letters and words to be too long.

The best way I can think of to handle this is to remove the second delay from the output_symbol method and handle this in the output_code method. There would have to be a check to see if the dit or dah being “coded” is the last one in the string provided to the output_code method, though, to make sure not to add too much of a space between letters or words.

2011-07-23
150SUGGEST

Page 150 mentions “draw the cube with Processing” and “Processing’s standard examples”, but it wasn’t at all clear to me that this code needed to be compiled/run in the Processing IDE. If Processing was explained earlier in the book, perhaps link back to that. Otherwise readers are likely to try to compile in the Arduino IDE — I’m not the first this happened to (forums.pragprog.com/forums/129/topics/9179)

2012-01-17
30OK

First Version of a Binary Die instead of Dice

2012-01-17
58DEFER

In this code example, syntax is used, on line 15, that is not explained in the text.

This forces the novice reader to pursue other resources for clarification.

Please fix in future editions.

2012-01-17You are right. In a future edition I'll replace the ternary operator with an if/else statement. \n
31TYPO

Italian print (apogeo-feltrinelli MAGGIO 2011)

Paragrafo: Sistemi di numerazione (pag 31)

la riga:
1x84+1x83+1x82+…
dovrebbe essere
1x8^4+1x8^3+1x8^2+…

2011-12-31We've passed this on to the Italian publisher.
52OK

When compiling the BinaryDice program I receive the following error:

Digital_Die_first_version:9: error: ‘A0’ was not declared in this scope

The line in question is line 10:
randomSeed(analogRead(A0));

2012-01-17
52OK

The Actual line of code for line 10 should be:

randomSeed(analogRead(0));

2012-01-17Hi Eric! \n \nYou're probably using an old version of the IDE. Since version 19 the IDE defines constant names for all analog pins. \n \nCheers, \nMaik \n
69OK

The phrase “For a binary die” should be “For a binary dice”.

2012-08-20
160ERROR

The API for Ethernet has changed at Arduino 1.0 and the documentation was not updated. The code at page 160 will not work for 1.0 since the gateway is now the forth parameter.
The new signatures are:

Ethernet.begin(mac);
Ethernet.begin(mac,ip);
Ethernet.begin(mac,ip,dns);
Ethernet.begin(mac,ip,dns,gateway);
Ethernet.begin(mac,ip,dns,gateway,subnet);

Regards

2012-08-20
128ERROR

In the
If (button.update())
section of code I do not get any change in the serial monitor when I push then button

2012-08-20
166TYPO

It appears that
➾ MAIL FROM: &arduino@example.com>
should be
➾ MAIL FROM: <arduino@example.com>
and
➾ RCPT TO: &info@example.com>
should be
➾ RCPT TO: <info@example.com>

2012-08-20
69TYPO

#48837: The phrase “For a binary die” should be “For a binary dice”.—Michel Graciano

The above erratum cannot be correct. The text should either be “For binary dice” (plural) or “For a binary die” (singular).

The erratum says that this was corrected in v.4.0.

107DEFER

The Arduinofun-URL is broken

2013-06-12Unfortunately, arduinofun.com does not exist anymore.
73OK

In Chapter 4 “Building a Morse Code Generator Library”, I found the “HelloWorld” sketch failed to compile. I am using Arduino 1.0.3.

The Arduino library tutorial indicates an #include statement is needed within the header file. Adding

#include “Arduino.h”

to telegraph.h resolved the problem I was having.

2013-06-12Hi Murray! \n \nIn Arduino 1.0.5 it compiles without problems. It should also work on 1.0.3, because telegraph.cpp includes Arduino.h already. You have to copy the Telegraph folder to your Arduino libraries folder and restart the IDE. \n \nBest, \nMaik
27DEFER

Screen shot[s] of the IDE (Figs 13 and 14) do not have menu items. Somewhat confusing when page 26 refers to item: Sketch > Show Sketch Folder and you don’t see the menu item.

2013-06-12Hi David! \n \nThat's really a problem when taking screenshots on a Mac, because the menu items do not belong to an application's window. Next time I'll better take some of these screenshots on a Windows box. \n \nBest, \nMaik \n
145DEFER

The “while” command on line 20 for the MotionSensor/NunchuckDemo/nunchuk.cpp appears to be missing the curly braces around the lines of code to be executed “while”.

20 while (Wire.available() && byte_counter < NUNCHUK_BUFFER SIZE)
- _buffer[byte_counter] = decode_byte(Wire.receive());

There should be curly braces around the second line (21) of code. Unless what appears to be two lines is actually one line. The indentation of the second line is not clear enough to make that determination.

2013-06-12Hi Howard! \n \nAs far as I can see the code is correct. Do you want to add curly braces for clarity? \n \nBest, \nMaik
208ERROR

When you compile the codde on this page, you get the following error:

sketch_jun05a:5: error: expected ‘,’ or ‘…’ before ‘*’ token

This code was downloaded for the link you provided.

2013-06-12Hi Terry! \n \nI guess you're talking about the Blaminatr.ino file? I've downloaded it a few minutes ago and i compiles without problems. What Arduino version did you use?
44TYPO

The image of the items needed for the “binary dice” project has a 6 in it twice, once for the resistor, and once for the wires. The reason I noticed this, is I was looking for a picture of the (optional) number 9, “tilt sensor”, as I am not sure what one looks like.
I am still not sure what it looks like, so please add a link to an image of one would be greatly appreciated.

Thank you very much! This will be fixed in the second edition. \n \nBest, \nMaik \n
14TYPO

The function definition shows markup tags < and > instead of symbols < and >

Thanks for pointing this out. It'll be fixed in the second edition.
93ERROR

In method Telegraph::output_symbol() at the end of the function there should be a delay(length) so that there is a gap between the output pin going low and the next time it goes high at the start of the next dit or dah. (I found this bug by inspection of the code in the pdf, not through running the code.)

20ERROR

“Make absolutely sure that you’re using pin 13! If you connect the LED to any other pin, it will probably be destroyed. The reason is that pin 13 has an internal resistor that the other pins don’t have (you’ll learn more about this in Chapter 3, Building Binary Dice,on page 43).”

The above quotation from page 20 (PDF) is incorrect. The last Arduino version to have a series resistor between the microcontroller and pin 13 was the NG. On all newer versions Diecimila, Duemilanove, Uno, etc.) pin 13 is connected directly to the microcontroller. This incorrect explanation is repeated on page 47. (Reference: schematics for all Arduino boards available at arduino.cc)

Thank you very much for the hint! It'll be fixed in the second edition. \n \nBest, \nMaik \n
16TYPO

c,kbnn,.m/

253ERROR

Hi , while the sending data is " 0 1 0 0 1 1 0 1" u r saying sir: " We chose odd parity for our data , and because there are 4 bits set to 1 in 01001101 , the parity bit is 0 " . I think there is a mistake and parity bit should be “1” if we chose it as an odd parity , because when we send the data with parity bit , we have to count 1s in data that has to include parity bit , too in order to control. Here , if we chose odd parity , - while our data is 01001101 the sending data would be 010011011-we have to choose parity as 1 , now we can count 1s and it is 5 - including our last bit , parity bit , as well - .

Categories: