A Library to add support of MCP9808 precision temperature sensor to Particle core (Formerly Spark Core).
Before your setup function
#include "MCP9808/MCP9808.h"
MCP9808 mcp = MCP9808();In your setup function
// MCP9808 sensor setup
while(! mcp.begin()){
Serial.println("Couldnt find MCP9808");
delay(1000);
}
mcp.setResolution(MCP9808_SLOWEST);In your loop you can now get the temperature like that
temperature = mcp.getTemperature();- Fork it (https://github.com/romainmp/MCP9808/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request