Advertisement
lobmans

Untitled

Dec 16th, 2020 (edited)
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.55 KB | None | 0 0
  1. int32_t t_podacha;
  2. int32_t t_obratka;
  3. uint8_t gpio=12;
  4. void ICACHE_FLASH_ATTR
  5. startfunc(){
  6. valdes[0] = 1800;
  7. valdes[1] = 3000;
  8. valdes[2] = 300;
  9. valdes[3] = 0;
  10. }
  11.  
  12. void ICACHE_FLASH_ATTR timerfunc(uint32_t  timersrc) {
  13.     t_podacha = data1wire[0] ;
  14.     t_obratka = data1wire[1] ;
  15.    
  16.     if ( t_obratka > valdes[1] ){
  17.                 digitalWrite(12,1);
  18.         } else {  
  19.                 digitalWrite(12,0);
  20.         }
  21.     }
  22.  
  23. void webfunc(char *pbuf) {
  24. os_sprintf(HTTPBUFF,"<br>уровень: %d% <meta http-equiv='refresh' content='%d'>", valdes[1], t_obratka);
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement