Skip to content

Commit

Permalink
Fixed formula.
Browse files Browse the repository at this point in the history
  • Loading branch information
jquiros2 authored Sep 29, 2020
1 parent 1be1787 commit bcac89c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dht22.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ struct sensorOutput parseSensorOutput(int GPIO) {
// If the sensor query was successful
if (querySensor(GPIO, sensorData)) {
// Parse the temperature and humidity data
result.temperature=(((sensorData[2]*256+sensorData[3])/10)*(9/5))+32;
result.temperature=(((sensorData[2]*256+sensorData[3])/10)*9/5)+32;
result.humidity=(sensorData[0]*256+sensorData[1])/10;

// Check and adjust for negative temperatures
Expand Down

0 comments on commit bcac89c

Please sign in to comment.