Commit Iniziale, progetto funzionante caricato su box ETcontroller in

cantina
This commit is contained in:
2019-10-09 23:25:44 +02:00
commit c6e4e461ca
555 changed files with 118433 additions and 0 deletions

BIN
MAX6675/.hg/00changelog.i Normal file

Binary file not shown.

2
MAX6675/.hg/cache/branchheads vendored Normal file
View File

@@ -0,0 +1,2 @@
01ccbb10ca4c68bf969ad05ce25c6d71564bd289 1
01ccbb10ca4c68bf969ad05ce25c6d71564bd289 default

1
MAX6675/.hg/cache/nooutgoing vendored Normal file
View File

@@ -0,0 +1 @@
01ccbb10ca4c68bf969ad05ce25c6d71564bd289 1

2
MAX6675/.hg/cache/tags vendored Normal file
View File

@@ -0,0 +1,2 @@
1 01ccbb10ca4c68bf969ad05ce25c6d71564bd289

BIN
MAX6675/.hg/dirstate Normal file

Binary file not shown.

26
MAX6675/.hg/hgignore Normal file
View File

@@ -0,0 +1,26 @@
syntax: glob
.hg
.git
.svn
.CVS
.cvs
*.orig
.build
.export
.msub
.meta
.ctags*
*.uvproj
*.uvopt
*.project
*.cproject
*.launch
*.ewp
*.eww
Makefile
Debug
*.htm
*.settings
mbed_settings.py
*.py[cod]
# subrepo ignores

4
MAX6675/.hg/hgrc Normal file
View File

@@ -0,0 +1,4 @@
[ui]
ignore.local = .hg/hgignore
[paths]
default = https://developer.mbed.org/teams/Lab-Measurements-2017/code/MAX6675_New/

View File

@@ -0,0 +1 @@
Lettura Termocoppie

4
MAX6675/.hg/requires Normal file
View File

@@ -0,0 +1,4 @@
revlogv1
fncache
store
dotencode

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,2 @@
data/MAX6675.cpp.i
data/MAX6675.h.i

View File

BIN
MAX6675/.hg/store/undo Normal file

Binary file not shown.

View File

@@ -0,0 +1 @@
1 915f5679c7938d04cc7b9f548dc11a403dbf675b

View File

1
MAX6675/.hg/undo.branch Normal file
View File

@@ -0,0 +1 @@
default

2
MAX6675/.hg/undo.desc Normal file
View File

@@ -0,0 +1,2 @@
1
commit

BIN
MAX6675/.hg/undo.dirstate Normal file

Binary file not shown.

31
MAX6675/MAX6675.cpp Normal file
View File

@@ -0,0 +1,31 @@
#include "MAX6675.h"
Thermo::Thermo(SPI* dev=0, PinName p=D0){
device = dev;
cs = new DigitalOut(p);
cs->write(OFF);
}
Thermo::~Thermo(){
cs->write(OFF);
device->unlock();
}
char Thermo::readTemp(float* temp){
uint16_t data,t,s;
readRaw(&data);
t=(data & 0x7FF8)>>3;
s=(data & 0x0004)>>2;
*temp=t*0.25;
return s;
}
void Thermo::readRaw(uint16_t* data){
uint16_t d;
cs->write(ON);
device->lock();
d=device->write(0x0000);
device->unlock();
cs->write(OFF);
*data = d;
}

19
MAX6675/MAX6675.h Normal file
View File

@@ -0,0 +1,19 @@
#include <mbed.h>
#define ON 0
#define OFF 1
#define MAX6675_ERROR 1
#define MAX6675_OK 0
class Thermo {
public:
Thermo(SPI* dev, PinName p);
virtual ~Thermo();
char readTemp(float* temp);
void readRaw(uint16_t* data);
private:
SPI *device;
DigitalOut *cs;
};

1
MAX6675/MAX6675.lib Normal file
View File

@@ -0,0 +1 @@
https://developer.mbed.org/teams/Lab-Measurements-2017/code/MAX6675_New/#01ccbb10ca4c