0.3.0 MAX6675

This commit is contained in:
Rob Tillaart 2024-01-19 18:32:44 +01:00
parent e1e5f7cfba
commit 256d08178a
11 changed files with 30 additions and 9 deletions

View File

@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## [0.3.0] - 2024-01-19
- Fix #9, improve handling SPI dependency.
----
## [0.2.0] - 2023-11-28
- refactor constructor/begin interface - breaking changes.
- minimize conditional code. -- create SPI_CLASS macro to solve it.

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2022-2023 Rob Tillaart
Copyright (c) 2022-2024 Rob Tillaart
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,7 +1,7 @@
//
// FILE: MAX6675.cpp
// AUTHOR: Rob Tillaart
// VERSION: 0.2.0
// VERSION: 0.3.0
// PURPOSE: Arduino library for MAX6675 chip for K type thermocouple
// DATE: 2022-01-11
// URL: https://github.com/RobTillaart/MAX6675
@ -47,9 +47,9 @@ void MAX6675::begin()
if (_hwSPI)
{
_mySPI->end();
_mySPI->begin();
delay(1);
// _mySPI->end();
// _mySPI->begin();
// delay(1);
}
else
{

View File

@ -2,7 +2,7 @@
//
// FILE: MAX6675.h
// AUTHOR: Rob Tillaart
// VERSION: 0.2.0
// VERSION: 0.3.0
// 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.2.0"))
#define MAX6675_LIB_VERSION (F("0.3.0"))
#ifndef __SPI_CLASS__
#if defined(ARDUINO_ARCH_RP2040)

View File

@ -34,6 +34,13 @@ 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:

View File

@ -25,6 +25,7 @@ void setup ()
Serial.println();
delay(250);
SPI.begin();
thermoCouple.begin();
}

View File

@ -28,6 +28,8 @@ void setup()
Serial.println();
delay(250);
SPI.begin();
thermoCouple.begin();
thermoCouple.setSPIspeed(4000000);
}

View File

@ -8,6 +8,7 @@
#include "MAX6675.h"
const int selectPin = 5;
MAX6675 thermoCouple(selectPin, &SPI);
@ -24,6 +25,8 @@ void setup()
Serial.println();
delay(250);
SPI.begin();
thermoCouple.begin();
}

View File

@ -8,6 +8,7 @@
#include "MAX6675.h"
const int dataPin = 7;
const int clockPin = 6;
const int selectPin = 5;
@ -28,6 +29,8 @@ void setup()
// Serial.println();
delay(250);
SPI.begin();
thermoCouple.begin();
thermoCouple.setSPIspeed(4000000);

View File

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

View File

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