Dependencies:   mbed

Fork of DS1820_HelloWorld by jack zen

main.cpp

Committer:
jack__zen
Date:
2017-09-06
Revision:
6:7ef001211531
Parent:
5:c27ca1ae3915

File content as of revision 6:7ef001211531:

#include "mbed.h"
#include "max6675.h"
 
SPI spi(PA_7,PA_6,PA_5);
max6675 max(spi,PB_6);
 
Serial pc(USBTX,USBRX);
 
int main() {
    pc.baud(9600);
    while (1) {
    
        float temp = max.read_temp();
        pc.printf("\n\rT: %f",temp );
       
        wait(.25);
    }
 
 
}