fix print issue
This commit is contained in:
		
							parent
							
								
									3a2d1ec06f
								
							
						
					
					
						commit
						3c37b56fb5
					
				| @ -48,13 +48,13 @@ _, temperature = Adafruit_DHT.read_retry(DHT_SENSOR, DHT_PIN) | |||||||
| 
 | 
 | ||||||
| temperature = round(float(temperature),2) | temperature = round(float(temperature),2) | ||||||
| 
 | 
 | ||||||
| print("temperature after round: " + temperature) | print("temperature after round: " + str(temperature) | ||||||
| # Get Humidity from DHT | # Get Humidity from DHT | ||||||
| humidity, _ = Adafruit_DHT.read_retry(DHT_SENSOR, DHT_PIN) | humidity, _ = Adafruit_DHT.read_retry(DHT_SENSOR, DHT_PIN) | ||||||
| 
 | 
 | ||||||
| humidity = round(float(humidity),2) | humidity = round(float(humidity),2) | ||||||
| 
 | 
 | ||||||
| print("humidity after round: " + humidity) | print("humidity after round: " + str(humidity) | ||||||
| # Publish our data | # Publish our data | ||||||
| client.publish(temperature_topic, temperature) | client.publish(temperature_topic, temperature) | ||||||
| client.publish(humidity_topic, humidity) | client.publish(humidity_topic, humidity) | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user