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:
- devilal2101
- Date:
- 2019-09-03
- Revision:
- 0:0af9d6fdeb4e
File content as of revision 0:0af9d6fdeb4e:
#include "mbed.h"
InterruptIn button(D2);
DigitalOut led(D13);
DigitalOut triacPulse(D5);
void fire_angle() {
wait_ms(5);
triacPulse= 1;
wait_us(50);
// delay 50 uSec on output pulse to turn on triac
triacPulse = 0;
}
int main() {
button.fall(&fire_angle);
while(1) {
led = !led;
wait(1);
}
}