mirror of
https://github.com/RobTillaart/Arduino.git
synced 2024-09-19 16:46:11 -04:00
0.3.1 MAX6675
This commit is contained in:
parent
2e4eb500c8
commit
796cb900cd
1
libraries/MAX6675/.github/FUNDING.yml
vendored
1
libraries/MAX6675/.github/FUNDING.yml
vendored
@ -1,4 +1,5 @@
|
|||||||
# These are supported funding model platforms
|
# These are supported funding model platforms
|
||||||
|
|
||||||
github: RobTillaart
|
github: RobTillaart
|
||||||
|
custom: "https://www.paypal.me/robtillaart"
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
name: Arduino-lint
|
name: Arduino-lint
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 5
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: arduino/arduino-lint-action@v1
|
- uses: arduino/arduino-lint-action@v1
|
||||||
with:
|
with:
|
||||||
library-manager: update
|
library-manager: update
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
---
|
|
||||||
name: Arduino CI
|
name: Arduino CI
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
@ -6,9 +5,10 @@ on: [push, pull_request]
|
|||||||
jobs:
|
jobs:
|
||||||
runTest:
|
runTest:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 20
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: ruby/setup-ruby@v1
|
- uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
ruby-version: 2.6
|
ruby-version: 2.6
|
||||||
|
@ -9,10 +9,11 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 5
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: json-syntax-check
|
- name: json-syntax-check
|
||||||
uses: limitusus/json-syntax-check@v1
|
uses: limitusus/json-syntax-check@v2
|
||||||
with:
|
with:
|
||||||
pattern: "\\.json$"
|
pattern: "\\.json$"
|
||||||
|
|
||||||
|
@ -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/).
|
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
|
## [0.3.0] - 2024-01-19
|
||||||
- Fix #9, improve handling SPI dependency.
|
- Fix #9, improve handling SPI dependency.
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// FILE: MAX6675.cpp
|
// FILE: MAX6675.cpp
|
||||||
// AUTHOR: Rob Tillaart
|
// AUTHOR: Rob Tillaart
|
||||||
// VERSION: 0.3.0
|
// VERSION: 0.3.1
|
||||||
// PURPOSE: Arduino library for MAX6675 chip for K type thermocouple
|
// PURPOSE: Arduino library for MAX6675 chip for K type thermocouple
|
||||||
// DATE: 2022-01-11
|
// DATE: 2022-01-11
|
||||||
// URL: https://github.com/RobTillaart/MAX6675
|
// URL: https://github.com/RobTillaart/MAX6675
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// FILE: MAX6675.h
|
// FILE: MAX6675.h
|
||||||
// AUTHOR: Rob Tillaart
|
// AUTHOR: Rob Tillaart
|
||||||
// VERSION: 0.3.0
|
// VERSION: 0.3.1
|
||||||
// PURPOSE: Arduino library for MAX6675 chip for K type thermocouple
|
// PURPOSE: Arduino library for MAX6675 chip for K type thermocouple
|
||||||
// DATE: 2022-01-12
|
// DATE: 2022-01-12
|
||||||
// URL: https://github.com/RobTillaart/MAX6675
|
// URL: https://github.com/RobTillaart/MAX6675
|
||||||
@ -23,7 +23,7 @@
|
|||||||
#include "SPI.h"
|
#include "SPI.h"
|
||||||
|
|
||||||
|
|
||||||
#define MAX6675_LIB_VERSION (F("0.3.0"))
|
#define MAX6675_LIB_VERSION (F("0.3.1"))
|
||||||
|
|
||||||
#ifndef __SPI_CLASS__
|
#ifndef __SPI_CLASS__
|
||||||
#if defined(ARDUINO_ARCH_RP2040)
|
#if defined(ARDUINO_ARCH_RP2040)
|
||||||
|
@ -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
|
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
|
#### Breakout
|
||||||
|
|
||||||
The library is tested with a breakout board with following pins:
|
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
|
#### 0.2.0 Breaking change
|
||||||
|
|
||||||
The version 0.2.0 has breaking changes in the interface.
|
The version 0.2.0 has breaking changes in the interface.
|
||||||
|
68
libraries/MAX6675/examples/MAX6675_array/MAX6675_array.ino
Normal file
68
libraries/MAX6675/examples/MAX6675_array/MAX6675_array.ino
Normal 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 --
|
@ -2,7 +2,6 @@
|
|||||||
// FILE: MAX6675_test.ino
|
// FILE: MAX6675_test.ino
|
||||||
// AUTHOR: Rob Tillaart
|
// AUTHOR: Rob Tillaart
|
||||||
// PURPOSE: demo
|
// PURPOSE: demo
|
||||||
// DATE: 2022-01-12
|
|
||||||
// URL: https://github.com/RobTillaart/MAX6675
|
// URL: https://github.com/RobTillaart/MAX6675
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
// FILE: MAX6675_test_HWSPI.ino
|
// FILE: MAX6675_test_HWSPI.ino
|
||||||
// AUTHOR: Rob Tillaart
|
// AUTHOR: Rob Tillaart
|
||||||
// PURPOSE: demo
|
// PURPOSE: demo
|
||||||
// DATE: 2022-01-12
|
|
||||||
// URL: https://github.com/RobTillaart/MAX6675
|
// URL: https://github.com/RobTillaart/MAX6675
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
// FILE: MAX6675_test_plotter.ino
|
// FILE: MAX6675_test_plotter.ino
|
||||||
// AUTHOR: Rob Tillaart
|
// AUTHOR: Rob Tillaart
|
||||||
// PURPOSE: demo
|
// PURPOSE: demo
|
||||||
// DATE: 2022-04-20
|
|
||||||
// URL: https://github.com/RobTillaart/MAX6675
|
// URL: https://github.com/RobTillaart/MAX6675
|
||||||
|
|
||||||
|
|
||||||
@ -20,6 +19,7 @@ uint32_t start, stop;
|
|||||||
|
|
||||||
float temp = 0;
|
float temp = 0;
|
||||||
|
|
||||||
|
|
||||||
void setup()
|
void setup()
|
||||||
{
|
{
|
||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/RobTillaart/MAX6675"
|
"url": "https://github.com/RobTillaart/MAX6675"
|
||||||
},
|
},
|
||||||
"version": "0.3.0",
|
"version": "0.3.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"frameworks": "*",
|
"frameworks": "*",
|
||||||
"platforms": "*",
|
"platforms": "*",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
name=MAX6675
|
name=MAX6675
|
||||||
version=0.3.0
|
version=0.3.1
|
||||||
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 MAX6675 chip for K type thermocouple.
|
sentence=Arduino library for MAX6675 chip for K type thermocouple.
|
||||||
|
Loading…
Reference in New Issue
Block a user