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
Binary file not shown.
+2
View File
@@ -0,0 +1,2 @@
01ccbb10ca4c68bf969ad05ce25c6d71564bd289 1
01ccbb10ca4c68bf969ad05ce25c6d71564bd289 default
+1
View File
@@ -0,0 +1 @@
01ccbb10ca4c68bf969ad05ce25c6d71564bd289 1
+2
View File
@@ -0,0 +1,2 @@
1 01ccbb10ca4c68bf969ad05ce25c6d71564bd289
Binary file not shown.
+26
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
View File
@@ -0,0 +1,4 @@
[ui]
ignore.local = .hg/hgignore
[paths]
default = https://developer.mbed.org/teams/Lab-Measurements-2017/code/MAX6675_New/
+1
View File
@@ -0,0 +1 @@
Lettura Termocoppie
+4
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.
+2
View File
@@ -0,0 +1,2 @@
data/MAX6675.cpp.i
data/MAX6675.h.i
View File
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
1 915f5679c7938d04cc7b9f548dc11a403dbf675b
View File
+1
View File
@@ -0,0 +1 @@
default
+2
View File
@@ -0,0 +1,2 @@
1
commit
Binary file not shown.
+31
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
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
View File
@@ -0,0 +1 @@
https://developer.mbed.org/teams/Lab-Measurements-2017/code/MAX6675_New/#01ccbb10ca4c