Skip to content

troppoli/MCP9808

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MCP9808

A Library to add support of MCP9808 precision temperature sensor to Particle core (Formerly Spark Core).

Usage

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

Contributing

  1. Fork it (https://github.com/romainmp/MCP9808/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

About

Spark Core library for the MCP9808 temperature sensor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 89.8%
  • Other 10.2%