07.12.19

Dependencies:   mbed

Committer:
riad
Date:
Sat Dec 07 12:54:18 2019 +0000
Revision:
0:2f2918e6b649
taster_led

Who changed what in which revision?

UserRevisionLine numberNew contents of line
riad 0:2f2918e6b649 1 #include "mbed.h"
riad 0:2f2918e6b649 2
riad 0:2f2918e6b649 3 DigitalOut myled(D6);
riad 0:2f2918e6b649 4 DigitalIn Taster(A3);
riad 0:2f2918e6b649 5
riad 0:2f2918e6b649 6 int main() {
riad 0:2f2918e6b649 7 while(true) {
riad 0:2f2918e6b649 8
riad 0:2f2918e6b649 9 if(Taster == true)
riad 0:2f2918e6b649 10 {
riad 0:2f2918e6b649 11 myled = 1;
riad 0:2f2918e6b649 12 }
riad 0:2f2918e6b649 13 else {myled=0;}
riad 0:2f2918e6b649 14 }
riad 0:2f2918e6b649 15 }
riad 0:2f2918e6b649 16