move sleep to convert method

This commit is contained in:
Martin Brodbeck 2022-05-31 16:06:48 +02:00
parent 39bac21110
commit dfa5713fb5
2 changed files with 1 additions and 1 deletions

View File

@ -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) {

View File

@ -52,7 +52,6 @@ int main() {
while (true) {
// ds.convert();
sleep_ms(750);
// temp_act = ds.getTemperature();
temp_act = 23.5;