Lab4-00_measure_temperature_lite

Dependencies:   mbed HEPTA_SENSOR_lite HEPTA_EPS_lite

main.cpp

Committer:
heptasat2021
Date:
2021-08-20
Revision:
2:0d5b50471a29
Parent:
1:ddac5ec89167

File content as of revision 2:0d5b50471a29:

#include "mbed.h"
#include "HEPTA_EPS.h"
#include "HEPTA_SENSOR.h"
HEPTA_EPS eps(PA_0,PA_4);
HEPTA_SENSOR sensor(PA_7,PB_7,PB_6,0xD0);
Serial pc(USBTX,USBRX,9600);
int main()
{   
    float temp;
    pc.printf("Temperature Sensor\r\n");
    eps.turn_on_regulator(); //Turn on 3.3V converter
    for(int i=0;i<10;i++){
        sensor.temp_sense(&temp);
        pc.printf("Temperature=%f[degC]\r\n",temp);
        wait_ms(1000);
    }
}