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.
Revision 0:0af9d6fdeb4e, committed 2019-09-03
- Comitter:
- devilal2101
- Date:
- Tue Sep 03 10:00:08 2019 +0000
- Commit message:
- control Fan speed complete.
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Tue Sep 03 10:00:08 2019 +0000
@@ -0,0 +1,22 @@
+#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);
+
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Sep 03 10:00:08 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file