Coder Social home page Coder Social logo

sparkfun / sparkfun_rht03_particle_library Goto Github PK

View Code? Open in Web Editor NEW
4.0 42.0 5.0 10 KB

Firmware library for the SparkFun RHT03 humidity and temperature sensor.

License: MIT License

C++ 66.25% Arduino 33.75%
particle-photon particle-io humidity sparkfun

sparkfun_rht03_particle_library's Issues

Does not return correct values for new Particle mesh devices.

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:

https://community.particle.io/t/incorrect-data-output-with-rht03-temp-humidity-sensor-using-argon-solved-but-now-using-dht11/46808

It is possible that the use of noInterrupts() and interrupts() may cause unintended problems with timing on the Mesh devices.

Temperatures below 0°C are rolling over

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"

Compile errors when using Particle Build

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);       

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.