Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MAX31855 SDFileSystem mbed
main.cpp
- Committer:
- DanielBlomdahl
- Date:
- 2016-03-08
- Revision:
- 1:8116bd9d3c46
- Parent:
- 0:42e8fa13c7a9
- Child:
- 2:a2966bf82e8c
File content as of revision 1:8116bd9d3c46:
#include "mbed.h"
DigitalOut myled(LED1);
SPI spi(p13,NC,p15);
//MAX31855 temperature(spi,0x90); // i2c, address
/* The MAX31855 board has an address of 0x90 if ADD0 is connected to ground */
MAX31855 thermometer1(spi,p15);
MAX31855 thermometer2(spi,p16);
Timer t;
int main()
{
float temp1, temp2;
float lastTime = 0;
float dt = 0.5;
t.start();
while (1) {
if t.read()>lastTime+dt) {
lastTime = t.read()l
temp1 = thermometer1.read();
temp2 = thermometer2.read();
writeData(lastTime, temp1, temp2);
}
}
