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.
main.cpp
- Committer:
- bwang
- Date:
- 2019-11-11
- Revision:
- 0:5d2320fc9350
- Child:
- 1:d42ef49f54df
File content as of revision 0:5d2320fc9350:
#include "mbed.h"
DigitalOut led(LED1);
InterruptIn in(PA_10);
PwmOut out(PA_8);
Serial pc(USBTX, USBRX);
void turn_on() {
out.pulsewidth_us(2);
led = 1;
}
void turn_off() {
out.pulsewidth_us(0);
led = 0;
}
int main() {
pc.printf("PYROFLEX\n");
out.period_us(10);
out.pulsewidth_us(2);
in.rise(turn_on);
in.fall(turn_off);
for (;;) {}
}