.from: http://mbed.org/projects/libraries/svn/mbed/trunk/DigitalIn.h
/* mbed Microcontroller Library - DigitalIn
* Copyright (c) 2006-2011 ARM Limited. All rights reserved.
*/
* Copyright (c) 2006-2011 ARM Limited. All rights reserved.
*/
// Flash an LED while a DigitalIn is true
#include "mbed.h"
DigitalIn enable(p5);
#include "mbed.h"
DigitalIn enable(p5);
DigitalOut led(LED1);
int main() {
while(1) {
if(enable) {
led = !led;
}
wait(0.25);
}
}
int main() {
while(1) {
if(enable) {
led = !led;
}
wait(0.25);
}
}
No comments:
Post a Comment