Course project for LE484 at Thammasat University, class of 2016

sensorTask.cpp

Committer:
3ecauz
Date:
2017-05-08
Revision:
8:12d666d1afb4
Parent:
7:d702abfe51e3
Child:
9:5b4959a735a1

File content as of revision 8:12d666d1afb4:

#include "mbed.h"
#include "platform.h"

AnalogIn analog_value(A0);
DigitalOut led(LED1);

void sensorIn()
{
    float meas;

    while(1) {
        meas = analog_value.read();
        meas = meas * 3300;
        printf("measure = %.0f mV\n", meas);

    }
}