SHARE
TWEET

Untitled

a guest Jul 12th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void processTemperature() {  
  2.    if (intervalTimePassed(intervalRequestTemperature, &lastRequestTemperature)) {
  3.      if (isDeviceResponding(adressRegulator)) {
  4.        requestTemperature();
  5.      }
  6.    }
  7.  
  8.    if (Wire.available()) {
  9.      serveIncomingTWI(sizeof(float), &incomingTWI[0]);  
  10.      temperatureDisplayOnLCD(mergeBytesToFloat(&incomingTWI[0]));
  11.    }  
  12. }
  13.  
  14. void processValueFromRegulator(byte requestValue, int interval, long* timeOfLastRequest) {
  15.   Serial.println(*timeOfLastRequest, HEX);
  16.   if (intervalTimePassed(interval, *timeOfLastRequest)) {
  17.     if (isDeviceResponding(adressRegulator)) {
  18.       requestFromRegulator(requestValue);
  19.     }
  20.   }
  21.  
  22.   if (Wire.available()) {
  23.     serveIncomingTWI(sizeof(float), &incomingTWI[0]);  
  24.     displayOnLCD(requestValue, mergeBytesToFloat(&incomingTWI[0]));
  25.   }  
  26. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top