Change 1wire pin to A8 as it's 5V tolerant
Dependencies: DS1820 mbed-STM32F103C8T6 mbed
Fork of stm32f103c8t6-ds18b20 by
Diff: main.cpp
- Revision:
- 13:c91214d92d70
- Parent:
- 12:c11b1e5546b0
- Child:
- 16:4db317017f49
diff -r c11b1e5546b0 -r c91214d92d70 main.cpp --- a/main.cpp Thu Jan 11 04:38:02 2018 +0000 +++ b/main.cpp Fri Jan 12 00:38:09 2018 +0000 @@ -9,7 +9,7 @@ while(1) { printf("Initiating temperature conversion\r\n"); - probe.convertTemperature(true, DS1820::all_devices); //Start temperature conversion, wait until ready + probe.convertTemperature(true, DS1820::this_device); //Start temperature conversion, wait until ready double temperature = probe.temperature(); int temp_integer = temperature; int temp_milli = (temperature - temp_integer) * 1000;