ss

Dependencies:   mbed MPU6050

Committer:
SantiagoE
Date:
Mon Feb 22 19:24:30 2021 +0000
Revision:
0:ac37887d5bb2
ss

Who changed what in which revision?

UserRevisionLine numberNew contents of line
SantiagoE 0:ac37887d5bb2 1 #include "mbed.h"
SantiagoE 0:ac37887d5bb2 2 #include "max6675.h"
SantiagoE 0:ac37887d5bb2 3
SantiagoE 0:ac37887d5bb2 4 SPI spi (D11, D12, D13); //MOSI, MISO, SCK
SantiagoE 0:ac37887d5bb2 5 max6675 maxtemp(spi,D10); // CS
SantiagoE 0:ac37887d5bb2 6 Serial pc(USBTX, USBRX); //Serial USB
SantiagoE 0:ac37887d5bb2 7 int main(){
SantiagoE 0:ac37887d5bb2 8 while (1){
SantiagoE 0:ac37887d5bb2 9
SantiagoE 0:ac37887d5bb2 10 float temp= maxtemp.read_temp();// lee la variable de temp
SantiagoE 0:ac37887d5bb2 11 pc.printf(" \n\rtemperatura: \%5.2F C",temp);// imprime el valor de temp
SantiagoE 0:ac37887d5bb2 12 wait(0.7);
SantiagoE 0:ac37887d5bb2 13
SantiagoE 0:ac37887d5bb2 14 }
SantiagoE 0:ac37887d5bb2 15
SantiagoE 0:ac37887d5bb2 16 }