Beispiel #1
0
void Timer::start(float p_time) {
	if (p_time > 0) {
		set_wait_time(p_time);
	}
	time_left = wait_time;
	_set_process(true);
}
Beispiel #2
0
void wait_10milsec(unsigned int timeout){
	set_wait_time(timeout);
	for(;;){
		if(waiter.flag==-1)
			return;
	}
	return;
}
Beispiel #3
0
DS18B20::DS18B20(char* nomenclature, bool is_analog, bool is_connected, bool is_low_power, uint8_t pin_read, uint8_t pin_power):Sensor(nomenclature, is_analog, is_connected, is_low_power, pin_read, pin_power){
  if (get_is_connected()){
    // start OneWire
    ds = new OneWire(get_pin_read());

    // to power the DS18B20
    pinMode(get_pin_power(),OUTPUT);
      
	if(get_is_low_power())
       digitalWrite(get_pin_power(),LOW);
    else
		digitalWrite(get_pin_power(),HIGH);
      
      set_wait_time(1000);
  }
}