Browse Source

minor documentation improvements ; added compatible boards section

pull/17/merge
Youen Toupin 7 years ago
parent
commit
4b1932de25
  1. 8
      library/OneWireSlave/documentation.md
  2. 12
      library/OneWireSlave/examples/FakeDS18B20/README.md

8
library/OneWireSlave/documentation.md

@ -1,5 +1,13 @@
This library allows you to emulate existing 1-wire devices with an Arduino, or to create your own protocol. All low-level details are handled by the library, such as reset detection, ROM matching, byte sending and receiving. Look at the demo sketch to see an example. This library allows you to emulate existing 1-wire devices with an Arduino, or to create your own protocol. All low-level details are handled by the library, such as reset detection, ROM matching, byte sending and receiving. Look at the demo sketch to see an example.
# Compatible boards
If you have tested the library on another board, please send a pull-request to update this list.
## ATmega328
- Arduino Uno (tested by [neuoy](https://github.com/neuoy))
# Reference # Reference
## setReceiveCallback ## setReceiveCallback

12
library/OneWireSlave/examples/FakeDS18B20/README.md

@ -1,12 +1,16 @@
This is the **DS18B20** fake emulator provided with the original version of OneWireArduinoSlave. This is a **DS18B20** emulator, i.e. it turns an Arduino Uno into a device roughly equivalent to an actual DS18B20 temperature sensor. Excepted in this sample it doesn't actually sense temperature (because the Arduino lacks the hardware for this), it just returns 42 as if that was the expected answer.
To make it working, connect : To make it work, you will need to connect your Arduino Uno to a 1-wire master (for example an USB adapter on a computer).
You can then connect:
- a GND pin of your Uno to your 1-wire network ground. - a GND pin of your Uno to your 1-wire network ground.
- the pin "2" of your Unto to the data line of your 1-wire network. You may use "3" as well but need to change the code. - the pin "2" of your Uno to the data line of your 1-wire network. You may use "3" as well but need to change the code.
You will see 28.000000000002 probe that always return 42 as temperature : You will see 28.000000000002 probe that always return 42 as temperature :
$ cat 28.000000000002/temperature $ cat 28.000000000002/temperature
42 42
Notez-bien : conversion timing is emulated as well. Conversion timing is emulated as well.
If you don't use an Arduino Uno, you may need to adjust which pin you connect as the data line (it needs to have hardware interrupts), and make the corresponding change in the example source code. A few microcontrollers are compatible with the library, check the full list in [the documentation](../../documentation.md).
Loading…
Cancel
Save