Show Posts
Pages: [1]
1  Using Arduino / Sensors / Re: DS18B20 Temperature Sensor returns "No more addresses." on: February 22, 2011, 01:36:39 am
Hi Pluggy and robtillaart

Thank you so much for your input!

I tried the following:
- use another place at the breadboard  and
- use other cables.
- just one 2.2K resistor instead of the 4.7K-resistor

Not it finds the DS18B20!

Great! smiley

PS. @all: if you haven't tried it out yet, use the Dallas Temperature Control Library:
http://milesburton.com/index.php/Dallas_Temperature_Control_Library
So much more easier to use than the demo-code in the tutorial!
2  Using Arduino / Sensors / Re: DS18B20 Temperature Sensor returns "No more addresses." on: February 18, 2011, 01:54:16 pm
Hi Pluggy

Thank you for your fast answer!

I tried that. Now the setup looks like this:


But still I get "No more addresses."
Any other guesses?
3  Using Arduino / Sensors / DS18B20 Temperature Sensor returns "No more addresses." on: February 18, 2011, 12:48:26 pm
After hours of trying, you are my last resort of hope.

I'm using the DS18B20 Temperature Sensor and tried to install it based on this OneWire-tutorial here:
http://www.arduino.cc/playground/Learning/OneWire

As I understand it the breadboard should look like this:

(the flat surface is facing to the front in this picture)
Unfortunately I have no 4.7k resistor, so I took two 2.2K resistors.

The code (taken from the tutorial) is this one:
Code:
#include <OneWire.h>

// DS18S20 Temperature chip i/o
OneWire ds(10);  // on pin 10

void setup(void) {
  // initialize inputs/outputs
  // start serial port
  Serial.begin(9600);
}

void loop(void) {
  byte i;
  byte present = 0;
  byte data[12];
  byte addr[8];

  if ( !ds.search(addr)) {
      Serial.print("No more addresses.\n");
      ds.reset_search();
      return;
  }

  Serial.print("R=");
  for( i = 0; i < 8; i++) {
    Serial.print(addr[i], HEX);
    Serial.print(" ");
  }

  if ( OneWire::crc8( addr, 7) != addr[7]) {
      Serial.print("CRC is not valid!\n");
      return;
  }

  if ( addr[0] == 0x10) {
      Serial.print("Device is a DS18S20 family device.\n");
  }
  else if ( addr[0] == 0x28) {
      Serial.print("Device is a DS18B20 family device.\n");
  }
  else {
      Serial.print("Device family is not recognized: 0x");
      Serial.println(addr[0],HEX);
      return;
  }

  ds.reset();
  ds.select(addr);
  ds.write(0x44,1);         // start conversion, with parasite power on at the end

  delay(1000);     // maybe 750ms is enough, maybe not
  // we might do a ds.depower() here, but the reset will take care of it.

  present = ds.reset();
  ds.select(addr);    
  ds.write(0xBE);         // Read Scratchpad

  Serial.print("P=");
  Serial.print(present,HEX);
  Serial.print(" ");
  for ( i = 0; i < 9; i++) {           // we need 9 bytes
    data[i] = ds.read();
    Serial.print(data[i], HEX);
    Serial.print(" ");
  }
  Serial.print(" CRC=");
  Serial.print( OneWire::crc8( data, 8), HEX);
  Serial.println();
}

I am using the OneWire 2.0 library: http://www.pjrc.com/teensy/td_libs_OneWire.html


All I get in the Serial Monitor is "No more addresses."
What does this error mean? How can I fix it?

Thank you so much for your answers!
4  Community / Website and Forum / Improvement Tutorial Example "Tone2" on: February 18, 2011, 01:06:25 am
Hi!

The Examples are great to get started. Good job!

I found some mistakes though, and would like to post them here:

In this tutorial:
http://arduino.cc/en/Tutorial/Tone2

1. The text says "Connect one terminal of your speaker to digital pin 9", the example code also writes to pin 9.
But the comment in the code says "8-ohm speaker on digital pin 8" and the example-code in the arduino-SDK also uses pin 8. This could confuse beginners.

2. In this picture:
http://arduino.cc/en/uploads/Tutorial/arduino_speaker_photocell_bb.png
The black wire on the left top side is unnecessary.

Regards
5  Community / Website and Forum / Improvement Tutorial-Example "Fade" on: February 18, 2011, 12:59:01 am
Hi!

The Examples are great to get started. Good job!

I found some mistakes though, and would like to post them here:

In this tutorial:
http://arduino.cc/en/Tutorial/Fade

In this picture:
http://arduino.cc/en/uploads/Tutorial/arduino_speaker_photocell_bb.png

The red and black wires on the right side are unnecessary.

Regards
Pages: [1]