mirror of
				https://github.com/niesteszeck/idDHT11.git
				synced 2025-10-30 14:44:03 +03:00 
			
		
		
		
	mod to the response timing
This commit is contained in:
		| @@ -68,9 +68,10 @@ void idDHT11::isrCallback() { | |||||||
| 	} | 	} | ||||||
| 	switch(state) { | 	switch(state) { | ||||||
| 		case RESPONSE: | 		case RESPONSE: | ||||||
| 			if(delta<25) | 			if(delta<25){ | ||||||
| 				return; //do nothing, it started the response signal | 				us -= delta; | ||||||
| 			if(125<delta && delta<170) { | 				break; //do nothing, it started the response signal | ||||||
|  | 			} if(125<delta && delta<190) { | ||||||
| 				state = DATA; | 				state = DATA; | ||||||
| 			} else { | 			} else { | ||||||
| 				detachInterrupt(intNumber); | 				detachInterrupt(intNumber); | ||||||
| @@ -83,7 +84,6 @@ void idDHT11::isrCallback() { | |||||||
| 				detachInterrupt(intNumber); | 				detachInterrupt(intNumber); | ||||||
| 				status = IDDHTLIB_ERROR_DELTA; | 				status = IDDHTLIB_ERROR_DELTA; | ||||||
| 				state = STOPPED; | 				state = STOPPED; | ||||||
| 				// return; |  | ||||||
| 			} else if(60<delta && delta<135) { //valid in timing | 			} else if(60<delta && delta<135) { //valid in timing | ||||||
| 				if(delta>90) //is a one | 				if(delta>90) //is a one | ||||||
| 					bits[idx] |= (1 << cnt); | 					bits[idx] |= (1 << cnt); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 niesteszeck
					niesteszeck