.from: http://mbed.org/projects/libraries/svn/mbed/trunk/AnalogIn.h
// Print messages when the AnalogIn is greater than 50%
#include "mbed.h"
AnalogIn temperature(p20);
int main() {
while(1) {
if(temperature > 0.5) {
printf("Too hot! (%f)", temperature.read());
}
}
}
#include "mbed.h"
AnalogIn temperature(p20);
int main() {
while(1) {
if(temperature > 0.5) {
printf("Too hot! (%f)", temperature.read());
}
}
}
No comments:
Post a Comment