For people who’ve had trouble getting TextFinder to work with Arduino 1.0-rc1, Michael Margolis has released a new version of the library that should compile for both the older Arduino 0022 and the newer Arduino 1.0-rc1. You can find it on the Arduino playground.

The following examples are affected by this:

 

Chapter 4

Chapter 6

Chapter 9

Chapter 10

The code in my gitHub repository for these examples is up to date for Arduino 1.0-rc1.

 

If you’re trying to use any of the Ethernet examples or the Wifi example straight from the 2nd edition of Making Things Talk, you’re probably getting some errors related to the definition of Client and Server. Here’s how to fix them.

Continue reading »

 

In the monski pong project in chapter 2, there is an error in checking the ball position relative to the paddle. The collision detection routine in animateBall() (p.66 first edition) assumes the ball’s position is being checked from the center of the paddle. In order to make this possible, you need to set the rectMode to CENTER.  In the setup(), add

rectMode(CENTER);

and all will be well.  The code example has been updated to reflect this.

 

On page 227, there is an error in the schematic.  IT shows the RX of the FTDI serial-to-USB adaptor connected to TXen of the XBee.  IT should be connected to the TX of the XBee instead.

Correction to Cat Project parts list

 Chapter 3, Errata  Comments Off on Correction to Cat Project parts list
Apr 032008
 

The Materials section on page 94 calls for between 2 and 4 10-kilohm resistors. In fact, you only need one resistor. On page 100, the schematic calls for a 1K resistor. You may need a higher value depending on the resistance range of your force sensing resistors and the weight of your cat. IF a 1K resistor doesn’t give you good values, try a 4.7K or a 10K resistor.

 

In the cat graphing example in chapter 3 as published in the book, the comments say:

// if the sensor value is less than the threshold,
// and the previous value was greater, then the cat
// just left the mat
if (prevSensorValue >= threshold) {
   catOnMat = false;
}

According to the second comment, the condition should be “greater,” but actual code is “greater or equal.”

The comment is right and the code should be as follows:

// if the sensor value is less than the threshold,
// and the previous value was greater, then the cat
// just left the mat
if (prevSensorValue > threshold) {
   catOnMat = false;
}

Thanks to Shigeru Kobayashi for catching this.

 

In the Chapter 1 Simple Serial code as published in the book says:

// after a quarter of a second, turn the LED on:

It should say

// after a half of a second, turn the LED on:

Thanks to Shigeru Kobayashi for catching it.

Monski Pong Server error

 Chapter 5, Errata  Comments Off on Monski Pong Server error
Feb 122008
 

There is an error in the Monski Pong code in chapter 5. An update has been posted to the original post. The delayCounter variable should have been a long, not a float, and it should have been initialized in the setup(), not before, so that it gets an initial value that’s very low.

Negotiating in Bluetooth

 Chapter 2, Errata  Comments Off on Negotiating in Bluetooth
Jan 072008
 

In the first edition of the book, there is no code for Project 3, Negotiating in Bluetooth. The project just describes how to use the blueSMiRF radio. With the BlueSMiRF v.2 radios from Spark Fun, the principles are the same, but the commands are different, because the BlueSMiRF v.2 is based on a different Bluetooth Radio (see this post for more). The full list of AT commands for this radio is online here. What follows is an update to Project 3, Negotiating in Bluetooth”

Continue reading »

Wireless Monski Pong

 Chapter 2, Errata  Comments Off on Wireless Monski Pong
Jan 072008
 

In the first edition of the book, there is no additional code for Wireless Monski Pong. The project just describes how to set up the project using the blueSMiRF radio. With the BlueSMiRF v.2 radios from Spark Fun, the wiring is the same as it was with the original blueSMiRF. Configuration is virtually the same as well. The only changes are as follows:

The device name for the BlueSMiRF v.2 radio is SparkFun-BT.

These radios don’t use a passcode, so when you search for the device, you want to choose not to use a passkey. For OSX users, this means that after you’ve selected the device type as “Any Device”, you’ll get the device discovery screen. Click the Passkey Options… button and select “Do not use a passkey with this device”. Then select the SparkFun-BT device.

For Windows users, the process should be the same. Unfortunately I don’t have a Windows machine to test with at the moment, I’ll update this post when I have one.

Once you’ve paired with the BlueSMiRF v.2, the instructions in the book will work just as they did with the original BlueSMiRF. The BlueSMiRF v.2 will not send out a CONNECT message when your computer connects to it, however.

© 2012 Making Things Talk Suffusion theme by Sayontan Sinha