hello

Fork of DigitalOut_HelloWorld by mbed official

Committer:
Anythingconnected
Date:
Thu Dec 21 10:23:43 2017 +0000
Revision:
3:f43b72de9484
Parent:
2:214e43d39085
hii

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Anythingconnected 2:214e43d39085 1 #include <mbed.h>
mbed_official 0:b5a9e0614efd 2
Anythingconnected 2:214e43d39085 3 //Define digital outputs
Anythingconnected 2:214e43d39085 4 DigitalOut LED = p0;
Anythingconnected 2:214e43d39085 5 DigitalOut VIBR = p1;
mbed_official 0:b5a9e0614efd 6
mbed_official 0:b5a9e0614efd 7 int main() {
Anythingconnected 2:214e43d39085 8 while (true) {
Anythingconnected 2:214e43d39085 9 LED = 1;
Anythingconnected 2:214e43d39085 10 VIBR = 1;
mbed_official 0:b5a9e0614efd 11 wait(0.2);
Anythingconnected 2:214e43d39085 12 VIBR = !VIBR;
Anythingconnected 2:214e43d39085 13 wait(0.2);
Anythingconnected 2:214e43d39085 14 VIBR = !VIBR;
mbed_official 0:b5a9e0614efd 15 wait(0.2);
Anythingconnected 2:214e43d39085 16 LED = !LED;
Anythingconnected 2:214e43d39085 17 VIBR = !VIBR;
Anythingconnected 2:214e43d39085 18 wait(2);
mbed_official 0:b5a9e0614efd 19 }
Anythingconnected 2:214e43d39085 20 }