Change Slave sends '0' during convert prozess on all DS18B20
[owSlave2.git] / DS18B20_BMP280 / DS18B20_BMP280.c
index 313a368..4a78bad 100644 (file)
@@ -43,6 +43,7 @@
 
 
 extern void OWINIT();
+extern void EXTERN_SLEEP();
 
 
 
@@ -102,12 +103,13 @@ int main(void){
        MCUSR=0;
        USI_TWI_Master_Initialise();
        bmp280Init();
-       
+       //DDRB|=(1<<PINB1);
        gcontrol=1;
        sei();
     while(1)   {
        
                if (gcontrol) {
+                       //PORTB|=(1<<PINB1); //Dauer 5.4ms
                        uint32_t P;
                        int32_t t;
                        bmp280ConvertInt(&t,&P,1);
@@ -123,7 +125,8 @@ int main(void){
                        //pack.temp++;
                        alarmflag=af;
                        sei();                  
-                       gcontrol=0;
+                       EXTERN_SLEEP();
+                       //PORTB&=~(1<<PINB1);
                }