move sleep to convert method
This commit is contained in:
parent
39bac21110
commit
dfa5713fb5
2 changed files with 1 additions and 1 deletions
|
@ -33,6 +33,7 @@ void DS18B20::readBytes(uint8_t bytes[], int len) {
|
|||
void DS18B20::convert() {
|
||||
uint8_t d[2] = {0xCC, 0x44};
|
||||
writeBytes(d, 2);
|
||||
sleep_ms(750);
|
||||
}
|
||||
|
||||
uint8_t DS18B20::crc8(uint8_t *data, uint8_t len) {
|
||||
|
|
|
@ -52,7 +52,6 @@ int main() {
|
|||
|
||||
while (true) {
|
||||
// ds.convert();
|
||||
sleep_ms(750);
|
||||
// temp_act = ds.getTemperature();
|
||||
temp_act = 23.5;
|
||||
|
||||
|
|
Loading…
Reference in a new issue