Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add some usage comments

  • Loading branch information...
commit 72a42e4ae8f43fb7ed359bd2aa97b75ebdc08598 1 parent 060d47b
Russ Nelson authored March 13, 2012

Showing 1 changed file with 16 additions and 0 deletions. Show diff stats Hide diff stats

  1. 16  apps/example_onewire/example_onewire.c
16  apps/example_onewire/example_onewire.c
... ...
@@ -1,4 +1,20 @@
1 1
 /** example_onewire: read Dallas Semiconductor OneWire devices.
  2
+Written by Russell Nelson <nelson@crynwr.com>. No copyright claimed.
  3
+
  4
+== Description ==
  5
+
  6
+Searches the OneWire bus for either a DS18B20 or DS1820. They differ by the id number (first byte) and by the format of the data they return. When it finds a DS18*20, it remembers the address and starts a sequence of temperature reads, once per second. It prints the temperature in degrees C via the USB as a serial port. Fire up a terminal and open up the serial port, or if you're on Linux, just: cat </dev/ttyACM0 and Bob's your uncle.
  7
+
  8
+Does not use the wireless. No reason why not.
  9
+
  10
+== Parameters ==
  11
+
  12
+The pin number is defined in onewire_ports.h.
  13
+
  14
+== Default pinout ==
  15
+
  16
+The DS device(s) are connected to P0_0. Because the code uses programmed loops for timing, I didn't want to fiddle with the timing in the Arduino code, and was afraid that the gpio library would change the timing too much. Feel free to modify it to use gpio for extra flexibility.
  17
+
2 18
  */
3 19
 
4 20
 #include <cc2511_map.h>

0 notes on commit 72a42e4

Please sign in to comment.
Something went wrong with that request. Please try again.