mirror of
https://github.com/RobTillaart/Arduino.git
synced 2024-10-03 18:09:02 -04:00
0.2.2 MCP9808_RT
This commit is contained in:
parent
321993ce1a
commit
2da9513a7e
@ -1,3 +1,18 @@
|
||||
platforms:
|
||||
rpipico:
|
||||
board: rp2040:rp2040:rpipico
|
||||
package: rp2040:rp2040
|
||||
gcc:
|
||||
features:
|
||||
defines:
|
||||
- ARDUINO_ARCH_RP2040
|
||||
warnings:
|
||||
flags:
|
||||
|
||||
packages:
|
||||
rp2040:rp2040:
|
||||
url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
|
||||
|
||||
compile:
|
||||
# Choosing to run compilation tests on 2 different Arduino platforms
|
||||
platforms:
|
||||
@ -9,3 +24,4 @@ compile:
|
||||
- esp32
|
||||
# - esp8266
|
||||
# - mega2560
|
||||
- rpipico
|
||||
|
44
libraries/MCP9808_RT/CHANGELOG.md
Normal file
44
libraries/MCP9808_RT/CHANGELOG.md
Normal file
@ -0,0 +1,44 @@
|
||||
# Change Log MCP9808_RT
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
|
||||
## [0.2.2] - 2022-11-17
|
||||
- add RP2040 in build-CI
|
||||
- add changelog.md
|
||||
- edit readme.md
|
||||
|
||||
|
||||
## [0.2.1] - 2021-12-21
|
||||
- update library.json
|
||||
- update license
|
||||
- minor edits
|
||||
|
||||
## [0.2.0] - 2021-11-19
|
||||
- fix #7 negative temperature
|
||||
|
||||
----
|
||||
|
||||
## [0.1.4] - 2021-11-08
|
||||
- update build-CI, badges
|
||||
- default offset for offset
|
||||
- default Wire for I2C bus - setAddress()
|
||||
|
||||
## [0.1.3] - 2021-01-01
|
||||
- Arduino-ci + unit test
|
||||
|
||||
## [0.1.2] - 2020-11-16
|
||||
- removed hasAlert
|
||||
- removed setAlertPin,
|
||||
- added 2 alert examples
|
||||
- refactor low level
|
||||
|
||||
## [0.1.1] - 2020-11-12
|
||||
- refactor
|
||||
|
||||
## [0.1.0] - 2020-05-03
|
||||
- initial version.
|
||||
|
@ -50,7 +50,7 @@ Default I2C bus is Wire.
|
||||
|
||||
#### Address
|
||||
|
||||
There ar max 8 sensors on one I2C bus.
|
||||
There are max 8 sensors on one I2C bus.
|
||||
Normal address = 0011xxx where xxx = A2, A1, A0
|
||||
|
||||
| Address | HEX | A2 | A1 | A0 |
|
||||
@ -81,7 +81,7 @@ There are three bits, see table below.
|
||||
A value of 6 == mask == 110 means that TA is above the upper and above the critical temperature.
|
||||
|
||||
| Bit | Mask | Description | Notes |
|
||||
|:----:|:------:|:------------|:----------------|
|
||||
|:-----:|:------:|:--------------|:-----------------|
|
||||
| 0 | 0x01 | TA < TLOWER | lower |
|
||||
| 1 | 0x02 | TA > TUPPER | larger |
|
||||
| 2 | 0x04 | TA ≥ TCRIT | larger or equal |
|
||||
@ -93,7 +93,7 @@ A value of 6 == mask == 110 means that TA is above the upper and above the criti
|
||||
- **uint8_t getResolution()** returns the resolution set.
|
||||
|
||||
| Value | Resolution | Conv time (ms) | Samples/s | Notes |
|
||||
|:------:|:-----------|:--------------:|:---------:|:-------:|
|
||||
|:-------:|:-------------|:----------------:|:-----------:|:--------:|
|
||||
| 0 | 0.5°C | 30 | 33 | |
|
||||
| 1 | 0.25°C | 65 | 15 | |
|
||||
| 2 | 0.125°C | 130 | 7 | |
|
||||
@ -112,7 +112,7 @@ Note: for the same resolution it is about 3x faster than a DS18B20.
|
||||
|:-----:|:------:|:-----------|:----------------|:-------|
|
||||
| 0 | 0x0001 | ALT MOD | alert mode | **0 = comparator output**, 1 = interrupt output
|
||||
| 1 | 0x0002 | ALT POL | alert polarity | **0 = active low**, 1 = active high
|
||||
| 2 | 0x0004 | ALT SEL | alert select | **0 = upper+lower+crit**, 1 = crit only
|
||||
| 2 | 0x0004 | ALT SEL | alert select | **0 = upper+lower+crit**, 1 = critical only
|
||||
| 3 | 0x0008 | ALT CNT | alert control | **0 = OFF**, 1 = ON
|
||||
| 4 | 0x0010 | ALT STAT | alert status | **0 = OFF**, 1 = ON (read!)
|
||||
| 5 | 0x0020 | INT CLR | interrupt clear | **0 = none**, 1 = clear interrupt
|
||||
@ -163,8 +163,19 @@ See examples
|
||||
|
||||
## Future
|
||||
|
||||
#### must
|
||||
- update documentation
|
||||
- do unit test
|
||||
- add more examples for the **ALERT**
|
||||
-
|
||||
- compare DS18B20?
|
||||
- test more
|
||||
- negative temperatures
|
||||
|
||||
#### should
|
||||
- do unit test
|
||||
- check for optimizations
|
||||
|
||||
#### could
|
||||
- add examples
|
||||
- for the **ALERT**
|
||||
- multi sensor
|
||||
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/RobTillaart/MCP9808_RT.git"
|
||||
},
|
||||
"version": "0.2.1",
|
||||
"version": "0.2.2",
|
||||
"license": "MIT",
|
||||
"frameworks": "arduino",
|
||||
"platforms": "*",
|
||||
|
@ -1,5 +1,5 @@
|
||||
name=MCP9808_RT
|
||||
version=0.2.1
|
||||
version=0.2.2
|
||||
author=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
sentence=Arduino Library for I2C MCP9808 temperature sensor
|
||||
|
@ -1,22 +1,10 @@
|
||||
//
|
||||
// FILE: mcp9808.cpp
|
||||
// AUTHOR: Rob Tillaart
|
||||
// VERSION: 0.2.1
|
||||
// VERSION: 0.2.2
|
||||
// PURPOSE: Arduino Library for I2C mcp9808 temperature sensor
|
||||
// DATE: 2020-05-03
|
||||
// URL: https://github.com/RobTillaart/MCP9808_RT
|
||||
//
|
||||
// HISTORY:
|
||||
// 0.1.0 2020-05-03 initial version
|
||||
// 0.1.1 2020-11-12 refactor
|
||||
// 0.1.2 2020-11-16 removed hasAlert, removed setAlertPin,
|
||||
// added 2 alert examples, refactor low level
|
||||
// 0.1.3 2021-01-01 Arduino-ci + unit test
|
||||
// 0.1.4 2021-11-08 update build-CI, badges
|
||||
// default offset for offset
|
||||
// default Wire for I2C bus - setAddress()
|
||||
// 0.2.0 2021-11-19 fix #7 negative temperature
|
||||
// 0.2.1 2021-12-21 update library.json, license, minor edits
|
||||
|
||||
|
||||
#include "mcp9808.h"
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// FILE: mcp9808.h
|
||||
// AUTHOR: Rob Tillaart
|
||||
// VERSION: 0.2.1
|
||||
// VERSION: 0.2.2
|
||||
// PURPOSE: Arduino Library for I2C mcp9808 temperature sensor
|
||||
// DATE: 2020-05-03
|
||||
// URL: https://github.com/RobTillaart/MCP9808_RT
|
||||
@ -17,7 +17,7 @@
|
||||
// 24..31 == 0x18..0x1F
|
||||
|
||||
|
||||
#define MCP9808_LIB_VERSION (F("0.2.1"))
|
||||
#define MCP9808_LIB_VERSION (F("0.2.2"))
|
||||
|
||||
|
||||
// CONFIGURATION REGISTER MASKS
|
||||
|
Loading…
Reference in New Issue
Block a user