sparkfun / sparkfun_rht03_particle_library Goto Github PK
View Code? Open in Web Editor NEWFirmware library for the SparkFun RHT03 humidity and temperature sensor.
License: MIT License
Firmware library for the SparkFun RHT03 humidity and temperature sensor.
License: MIT License
When using the RHT03 sensor and this library for the new Particle Mesh devices, the return values are not consistent. There is a thread in the Particle community forums about the issue here:
It is possible that the use of noInterrupts() and interrupts() may cause unintended problems with timing on the Mesh devices.
This code
"\"RHT03\":{" +
"\"T\":" + String(rht.tempC(), 2) + "," +
"\"H\":" + String(rht.humidity(), 2) +
"}," +
is creating this result
"RHT03":{"T":3279.80,"H":83.30}
These where all the readings on the same board during that fetch:
{"BME280":{"T":-1.88,"H":84.75,"P":1023.99},
"RHT03":{"T":3279.80,"H":83.30},
"DS18B20":{
"28CEB45204000083":{"T":-3.19,"C":1},
"28646952040000A2":{"T":-3.19,"C":1}
},
"A0":{"L":2.50}
}
I consider the DS18B20's temperature readings to be the "most precise"
There are two code issues in this library source that result in compilation errors if copy/pasted in to the Particle Build cloud IDE. I am not familiar enough with the Particle ecosystem and history to understand if/how this worked previously.
Compile errors:
src/SparkFunRHT03.cpp:119:28: error: 'CHECKSUM' was not declared in this scope
if (checksum(dataBytes[CHECKSUM], dataBytes, 4))
^
src/SparkFunRHT03.cpp:121:48: error: 'HUMIDITY_H' was not declared in this scope
_humidity = (static_cast<uint16_t>(dataBytes[HUMIDITY_H] << 8) | dataBytes[HUMIDITY_L]);
^
src/SparkFunRHT03.cpp:121:78: error: 'HUMIDITY_L' was not declared in this scope
_humidity = (static_cast<uint16_t>(dataBytes[HUMIDITY_H] << 8) | dataBytes[HUMIDITY_L]);
^
src/SparkFunRHT03.cpp:122:52: error: 'TEMP_H' was not declared in this scope
_temperature = static_cast<uint16_t> ((dataBytes[TEMP_H] << 8) | dataBytes[TEMP_L]);
^
src/SparkFunRHT03.cpp:122:78: error: 'TEMP_L' was not declared in this scope
_temperature = static_cast<uint16_t> ((dataBytes[TEMP_H] << 8) | dataBytes[TEMP_L]);
^
src/SparkFunRHT03.cpp:131:6: error:
prototype for 'bool RHT03::checksum(byte, const byte*, unsigned int)'
does not match any in class 'RHT03'
bool RHT03::checksum(const byte check, const byte * data, const unsigned int datalen)
src/SparkFunRHT03.cpp:35:7: error: candidate is: bool RHT03::checksum(byte, byte*, unsigned int)
bool checksum(byte check, byte * data, const unsigned int datalen);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.