Errata 2

Hello everyone, I found a few pictures that were inaccurate so I want to share those photo’s with you now.

The first challenges hardware build images had a few errors, so I wanted to clean them up, so without further adieu here are those fixed pictures:




The challenge card that was created for this challenge will still work so no worries. I hope this was helpful


Errata 1

in a few of the challenges we use analog inputs of the Arduino to read information of sensors, control motor speed, etc… all of these sketches where missing one piece of code in the setup() structure. The challenges that need to be changed are: Challenges 1, 3, 4, 6, and 7. You can either download the new revision of code Here or you can enter this into each of the challenges specified above:

//in the setup structure add this code

pinMode(“pinsname”, INPUT);

What is this code doing? it is setting the analog pin that you are using to an input which also activates a pull-up resistor on the micro-controller which protects us from any short circuits.

Here is an example of the revised Challenge 1 code:

void setup() {
// setup serial port
// Turns on Arduino’s A0 internal pull-up resistor
pinMode(A0, INPUT)

void loop() {
// set sensorValue to the reading on analog input 0
int sensorValue = analogRead(A0);
// set the mappedSensorValue to the value of the map() function
int mappedSensorValue = map(sensorValue, 0, 1023, 0, 9);
// send mappedSensorValue to the serial port.
Serial.println(mappedSensorValue, DEC);

You will notice that I use A0 as the value of analog pin 0; in other challenges this name will be different, for example in Challenge 4 this name would be PotPin.


8 thoughts on “Errata

  1. William Bottger

    I found another “error”. On page 66, it says “the digitaRead(3) will detect a flow voltage”. That is an incorrect mixed description of the event. Current flows. Electrons move due to electromotive force called Voltage. Voltage is felt or Voltage is present or Voltage is detectected . Please review my in depth explanation and insights at and also follow the //(Alternative Option) link at the bottom of the post for a real eye opener.
    v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v
    By using pinMode(A0, INPUT_PULLUP);, Arduino sketches will not need to include digitalWrite(inPIN, HIGH);. Although it works, doing the digitalWrite, an output function, for a PIN which had been declared to function as in INPUT “is illogical” (Spock).

    1. William Bottger

      Yet another correction to my post above:
      On page 66, it says “the digitaRead(3) will detect a flow of voltage”

  2. William Bottger

    Are you considering adopting INPUT_PULLUP in lieu of INPUT on the pinMode() statements throughout the book?

  3. Harold Timmis Post author

    The INPUT_PULLUP argument inside the pinMode function is nice as it will take away the need of those pesky digitalWrite() functions, good point thanks for the suggestion,

  4. Febs

    here’s my found.

    Page #33, Code for Challenge #1 sketch is OK:
    void setup (){
    // Comment here

    BUT in the “Beginning the Sketch” paragraph, when you describe it, it reads:

    void setup {

    There is no () there. Later on, when you describe “loop()” you do mention those () – and tell the reader not to worry about them. But, for setup () you describe the code by omitting the parentheses.

    More critical, you states in the same paragraph that “the code between { and } in the setup function tell the arduino to listen to the variable resistor in the circuit”.

    That is actually untrue, that is done in loop() later on.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s