comparison main.c @ 134:405785632c78

use delay_ms not timer tick - more robust
author Matt Johnston <matt@ucc.asn.au>
date Sun, 14 Oct 2012 21:52:09 +0800
parents 66d5e15f40d0
children 10d35b4370ef 2b112f9ab440
comparison
equal deleted inserted replaced
133:190ac4e5a2bf 134:405785632c78
967 { 967 {
968 first_measurement_clock = last_measurement_clock; 968 first_measurement_clock = last_measurement_clock;
969 } 969 }
970 970
971 simple_ds18b20_start_meas(NULL); 971 simple_ds18b20_start_meas(NULL);
972 // sleep rather than using a long delay 972 _delay_ms(DS18B20_TCONV_12BIT);
973 idle_sleep();
974 //_delay_ms(DS18B20_TCONV_12BIT);
975 973
976 if (n_measurements == max_measurements) 974 if (n_measurements == max_measurements)
977 { 975 {
978 n_measurements = 0; 976 n_measurements = 0;
979 } 977 }