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.

Age Checker

 Chapter 3, PHP  Comments Off on Age Checker
Oct 072007
 
/*
	Age checker
	Language: PHP
	Expects two parameters from the HTTP request: 
		name (a text string)
		age (an integer)
		Prints a personalized greeting based on the name and age.
*/

Continue reading »

Cat on Mat

 Chapter 3, PHP  Comments Off on Cat on Mat
Oct 072007
 
/*
Cat On Mat 
 Language: PHP
 
 Expects a parameter called SensorValue, an integer. 
 Prints a custom message depending on the value of SensorValue.

*/

Continue reading »

Mail Sender

 Chapter 3, PHP  Comments Off on Mail Sender
Oct 072007
 
/*
Mail sender
Language: PHP
Expects a parameter called SensorValue, an integer. Sends an email 
if sensorValue is above a threshold value.

*/

Continue reading »

Modified Date Printer

 Chapter 3, PHP  Comments Off on Modified Date Printer
Oct 072007
 
/*
	Modified Date page
	Language: PHP
	Prints the date. But no HTML.
*/

Continue reading »

Parameter Reader

 Chapter 3, PHP  Comments Off on Parameter Reader
Oct 072007
 
/*
	Parameter reader
	Language: PHP

	Prints any parameters sent in using an HTTP GET command.
*/

Continue reading »

Analog Sensor Reader

 Arduino/Wiring, Chapter 3  Comments Off on Analog Sensor Reader
Oct 072007
 
/*
  Analog sensor reader
  Language: Arduino/Wiring

  Reads an analog input on Analog in 0, prints the result 
  as an ASCII-formatted  decimal value.
  Connections: 
    FSR analog sensor on Analog in 0
*/

Continue reading »

Cat Graphing Program

 Chapter 3, Processing  Comments Off on Cat Graphing Program
Oct 072007
 
/*
  Cat graphing program
  Language: Processing

  Reads in a string of characters until it gets a linefeed (ASCII 10). 
  Then converts the string into a number. Then graphs it. 
  If the number has changed significantly, and there hasn't been 
  a big change in more than a minute, the program prints a 
  text string in place of an email message.
  
*/

Continue reading »

HTTP Sender

 Chapter 3, Processing  Comments Off on HTTP Sender
Oct 072007
 
/*
  HTTP sender
  Language: Processing
  Uses the Processing net library to make an HTTP request.
*/

Continue reading »

© 2012 Making Things Talk Suffusion theme by Sayontan Sinha