0.2.2 MTP40C

This commit is contained in:
rob tillaart 2022-11-18 14:05:26 +01:00
parent 31ec3d648f
commit 4bcd11b45d
8 changed files with 83 additions and 41 deletions

View File

@ -1,11 +1,27 @@
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: compile:
# Choosing to run compilation tests on 2 different Arduino platforms # Choosing to run compilation tests on 2 different Arduino platforms
platforms: platforms:
- uno - uno
- due # - due
- zero # - zero
- leonardo # - leonardo
- m4 - m4
- esp32 - esp32
# - esp8266 # - esp8266
# - mega2560 # - mega2560
- rpipico

View File

@ -0,0 +1,32 @@
# Change Log MTP40C
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
## [0.2.1] - 2021-12-22
- update library.json
- update license
- minor edits
## [0.2.0] - 2021-08-27
- add MTP40D derived class
- many fixes after testing
----
## [0.1.1] - 2021-08-23
- addexamples
- minor fixes
## [0.1.0] - 2021-08-20
- initial version.

View File

@ -1,17 +1,11 @@
// //
// FILE: MTP40C.h // FILE: MTP40C.cpp
// AUTHOR: Rob Tillaart // AUTHOR: Rob Tillaart
// DATE: 2021-08-20 // DATE: 2021-08-20
// VERSION: 0.2.1 // VERSION: 0.2.2
// PURPOSE: Arduino library for MTP40C MTP40D CO2 sensor // PURPOSE: Arduino library for MTP40C MTP40D CO2 sensor
// URL: https://github.com/RobTillaart/MTP40C // URL: https://github.com/RobTillaart/MTP40C
//
// HISTORY:
// 0.1.0 2021-08-20 initial version
// 0.1.1 2021-08-23 added examples, minor fixes
// 0.2.0 2021-08-27 added MTP40D derived class
// + many fixes after testing
// 0.2.1 2021-12-22 update library.json, license, minor edits
#include "MTP40C.h" #include "MTP40C.h"
@ -137,7 +131,6 @@ bool MTP40::setAirPressureReference(float apr)
uint16_t MTP40::getGasConcentration() uint16_t MTP40::getGasConcentration()
{ {
_lastError = MTP40_OK; _lastError = MTP40_OK;
// max read freq 1x per 4 seconds // max read freq 1x per 4 seconds

View File

@ -3,12 +3,11 @@
// FILE: MTP40C.h // FILE: MTP40C.h
// AUTHOR: Rob Tillaart // AUTHOR: Rob Tillaart
// DATE: 2021-08-20 // DATE: 2021-08-20
// VERSION: 0.2.1 // VERSION: 0.2.2
// PURPOSE: Arduino library for MTP40C + MTP40D CO2 sensor // PURPOSE: Arduino library for MTP40C + MTP40D CO2 sensor
// URL: https://github.com/RobTillaart/MTP40C // URL: https://github.com/RobTillaart/MTP40C
// //
// HISTORY: // HISTORY: see changelog.md
// see MTP40C.cpp file
// //
// Based upon datasheet June 2020, version 2.0 // Based upon datasheet June 2020, version 2.0
// //
@ -17,7 +16,7 @@
#include "Arduino.h" #include "Arduino.h"
#define MTP40_LIB_VERSION (F("0.2.1")) #define MTP40_LIB_VERSION (F("0.2.2"))
#define MTP40_DEFAULT_ADDRESS 0x64 #define MTP40_DEFAULT_ADDRESS 0x64
@ -68,7 +67,8 @@ public:
uint32_t lastRead() { return _lastRead; }; uint32_t lastRead() { return _lastRead; };
// 2 = MTP40C 3 = MTP40D // 2 = MTP40C
// 3 = MTP40D
uint8_t getType() { return _type; }; uint8_t getType() { return _type; };
int lastError(); int lastError();

View File

@ -204,6 +204,11 @@ moments. Valid values are 24 - 720 .
- **uint16_t getSelfCalibrationHours()** returns the value set above. - **uint16_t getSelfCalibrationHours()** returns the value set above.
## Operations
See examples.
## Future ## Future
#### CRC #### CRC
@ -223,11 +228,7 @@ moments. Valid values are 24 - 720 .
- serial bus with multiple devices? => diodes - serial bus with multiple devices? => diodes
- improve readability code (e.g. parameter names) - improve readability code (e.g. parameter names)
- move all code from .h to .cpp file
## Operations
See examples.
## Sponsor ## Sponsor

View File

@ -15,7 +15,7 @@
"type": "git", "type": "git",
"url": "https://github.com/RobTillaart/MTP40C.git" "url": "https://github.com/RobTillaart/MTP40C.git"
}, },
"version": "0.2.1", "version": "0.2.2",
"license": "MIT", "license": "MIT",
"frameworks": "arduino", "frameworks": "arduino",
"platforms": "*", "platforms": "*",

View File

@ -1,5 +1,5 @@
name=MTP40C name=MTP40C
version=0.2.1 version=0.2.2
author=Rob Tillaart <rob.tillaart@gmail.com> author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com> maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=Arduino library for MTP40, MTP40C and MTP40D CO2 sensor sentence=Arduino library for MTP40, MTP40C and MTP40D CO2 sensor