A cut-down version of https://os.mbed.com/users/Sissors/code/DS1820/ tweaked for use with the STM32F103. It is all generic Mbed operations though, so should be usable anywhere. Non-essential functions have been removed, as this is intended for use within a tutorial.
Dependents: STM32F103C8T6_DS18B20 stm32f103c8t6-ds18b20
Fork of DS1820 by
Diff: DS1820.cpp
- Revision:
- 18:3a24aedc1e7c
- Parent:
- 17:045f96704cc6
--- a/DS1820.cpp Fri Jan 12 00:38:01 2018 +0000 +++ b/DS1820.cpp Mon Jan 15 03:53:13 2018 +0000 @@ -15,8 +15,6 @@ DS1820::DS1820 (PinName data_pin) : _datapin(data_pin) { int byte_counter; - tracer = 1; - for(byte_counter=0;byte_counter<9;byte_counter++) RAM[byte_counter] = 0x00;