0.3.1 MAX6675

This commit is contained in:
Rob Tillaart 2024-04-11 10:09:14 +02:00
parent 2e4eb500c8
commit 796cb900cd
14 changed files with 97 additions and 22 deletions

View File

@ -1,4 +1,5 @@
# These are supported funding model platforms
github: RobTillaart
github: RobTillaart
custom: "https://www.paypal.me/robtillaart"

View File

@ -1,12 +1,12 @@
name: Arduino-lint
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: arduino/arduino-lint-action@v1
with:
library-manager: update

View File

@ -1,4 +1,3 @@
---
name: Arduino CI
on: [push, pull_request]
@ -6,9 +5,10 @@ on: [push, pull_request]
jobs:
runTest:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6

View File

@ -9,10 +9,11 @@ on:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: json-syntax-check
uses: limitusus/json-syntax-check@v1
uses: limitusus/json-syntax-check@v2
with:
pattern: "\\.json$"

View File

@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## [0.3.1] - 2024-04-09
- update GitHub actions
- add array example
- minor edits
## [0.3.0] - 2024-01-19
- Fix #9, improve handling SPI dependency.

View File

@ -1,7 +1,7 @@
//
// FILE: MAX6675.cpp
// AUTHOR: Rob Tillaart
// VERSION: 0.3.0
// VERSION: 0.3.1
// PURPOSE: Arduino library for MAX6675 chip for K type thermocouple
// DATE: 2022-01-11
// URL: https://github.com/RobTillaart/MAX6675

View File

@ -2,7 +2,7 @@
//
// FILE: MAX6675.h
// AUTHOR: Rob Tillaart
// VERSION: 0.3.0
// VERSION: 0.3.1
// PURPOSE: Arduino library for MAX6675 chip for K type thermocouple
// DATE: 2022-01-12
// URL: https://github.com/RobTillaart/MAX6675
@ -23,7 +23,7 @@
#include "SPI.h"
#define MAX6675_LIB_VERSION (F("0.3.0"))
#define MAX6675_LIB_VERSION (F("0.3.1"))
#ifndef __SPI_CLASS__
#if defined(ARDUINO_ARCH_RP2040)

View File

@ -34,13 +34,6 @@ Different TC's have a different Seebeck Coefficient (SC) expressed in µV/°C.
See http://www.analog.com/library/analogDialogue/archives/44-10/thermocouple.html
#### 0.3.0 Breaking change
Version 0.3.0 introduced a breaking change to improve handling the SPI dependency.
The user has to call **SPI.begin()** or equivalent before calling **AD.begin()**.
Optionally the user can provide parameters to the **SPI.begin(...)**
#### Breakout
The library is tested with a breakout board with following pins:
@ -55,6 +48,14 @@ The library is tested with a breakout board with following pins:
+---------------------+
```
#### 0.3.0 Breaking change
Version 0.3.0 introduced a breaking change to improve handling the SPI dependency.
The user has to call **SPI.begin()** or equivalent before calling **AD.begin()**.
Optionally the user can provide parameters to the **SPI.begin(...)**
#### 0.2.0 Breaking change
The version 0.2.0 has breaking changes in the interface.

View File

@ -0,0 +1,68 @@
//
// FILE: MAX6675_array.ino
// AUTHOR: Rob Tillaart
// PURPOSE: demo
// URL: https://github.com/RobTillaart/MAX6675
// URL: https://github.com/RobTillaart/MAX6675/issues/11
#include "MAX6675.h"
const int ThermoCouplesNum = 3;
MAX6675 ThermoCouples[ThermoCouplesNum] =
{
MAX6675(3, &SPI), // HW SPI
MAX6675(4, &SPI), // HW SPI
MAX6675(5, 6, 7) // SW SPI
};
uint32_t start, stop;
void setup()
{
Serial.begin(115200);
Serial.println(__FILE__);
Serial.print("MAX6675_LIB_VERSION: ");
Serial.println(MAX6675_LIB_VERSION);
Serial.println();
delay(250);
SPI.begin();
for (int i = 0; i < ThermoCouplesNum; i++)
{
ThermoCouples[i].begin();
ThermoCouples[i].setSPIspeed(4000000);
}
}
void loop()
{
delay(100);
for (int THCnumber = 0; THCnumber < ThermoCouplesNum; THCnumber++)
{
start = micros();
int status = ThermoCouples[THCnumber].read();
stop = micros();
float temp = ThermoCouples[THCnumber].getTemperature();
Serial.print(millis());
Serial.print("\tID: ");
Serial.print(THCnumber);
Serial.print("\tstatus: ");
Serial.print(status);
Serial.print("\ttemp: ");
Serial.print(temp);
Serial.print("\tus: ");
Serial.println(stop - start);
delay(1000); // time to flush all Serial stuff
}
Serial.println();
}
// -- END OF FILE --

View File

@ -2,7 +2,6 @@
// FILE: MAX6675_test.ino
// AUTHOR: Rob Tillaart
// PURPOSE: demo
// DATE: 2022-01-12
// URL: https://github.com/RobTillaart/MAX6675

View File

@ -2,7 +2,6 @@
// FILE: MAX6675_test_HWSPI.ino
// AUTHOR: Rob Tillaart
// PURPOSE: demo
// DATE: 2022-01-12
// URL: https://github.com/RobTillaart/MAX6675

View File

@ -2,7 +2,6 @@
// FILE: MAX6675_test_plotter.ino
// AUTHOR: Rob Tillaart
// PURPOSE: demo
// DATE: 2022-04-20
// URL: https://github.com/RobTillaart/MAX6675
@ -20,6 +19,7 @@ uint32_t start, stop;
float temp = 0;
void setup()
{
Serial.begin(115200);

View File

@ -15,7 +15,7 @@
"type": "git",
"url": "https://github.com/RobTillaart/MAX6675"
},
"version": "0.3.0",
"version": "0.3.1",
"license": "MIT",
"frameworks": "*",
"platforms": "*",

View File

@ -1,5 +1,5 @@
name=MAX6675
version=0.3.0
version=0.3.1
author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=Arduino library for MAX6675 chip for K type thermocouple.