Demo of OneWire Library for mbed using the DS18B20 as an example slave device. Connect Tera Term t 9600bps 8N1 with terminal 'Receive' to auto and 'Transmit' to CR+LF
Dependencies: OneWire Terminal mbed
Revision 2:343505f6da8d, committed 2017-03-24
- Comitter:
- j3
- Date:
- Fri Mar 24 19:57:27 2017 +0000
- Parent:
- 1:819782bce064
- Commit message:
- updated libs, example.; Need to investigate 'mbed_wait_api' update
Changed in this revision
diff -r 819782bce064 -r 343505f6da8d OneWire.lib --- a/OneWire.lib Wed Aug 03 22:53:46 2016 +0000 +++ b/OneWire.lib Fri Mar 24 19:57:27 2017 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/teams/Maxim-Integrated/code/OneWire/#4697f641eafb +https://developer.mbed.org/teams/Maxim-Integrated/code/OneWire/#cf38f48a2a49
diff -r 819782bce064 -r 343505f6da8d Terminal.lib --- a/Terminal.lib Wed Aug 03 22:53:46 2016 +0000 +++ b/Terminal.lib Fri Mar 24 19:57:27 2017 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/users/j3/code/Terminal/#419eea2fe960 +https://developer.mbed.org/users/j3/code/Terminal/#aa29b7e10cd8
diff -r 819782bce064 -r 343505f6da8d main.cpp --- a/main.cpp Wed Aug 03 22:53:46 2016 +0000 +++ b/main.cpp Fri Mar 24 19:57:27 2017 +0000 @@ -154,17 +154,10 @@ { //print the rom number term.printf("\n"); - int8_t idx = (RomId::byteLen - 1); + int8_t idx = 8; do { - if(romId[idx] < 16) - { - term.printf("0x0%x ", romId[idx--]); - } - else - { - term.printf("0x%2x ", romId[idx--]); - } + term.printf("0x%02x ", romId.buffer[idx--]); } while(idx >= 0); term.printf("\n");
diff -r 819782bce064 -r 343505f6da8d mbed.bld --- a/mbed.bld Wed Aug 03 22:53:46 2016 +0000 +++ b/mbed.bld Fri Mar 24 19:57:27 2017 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/f9eeca106725 \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/093f2bd7b9eb \ No newline at end of file