Mirembe Jean d'Amour / Mbed 2 deprecated ASSIGNMENT_PART4

Dependencies:   mbed

main.cpp

Committer:
titig
Date:
2020-11-01
Revision:
0:c7ce501d534b
Child:
1:aa3ea7b4673e

File content as of revision 0:c7ce501d534b:

#include "mbed.h"
DigitalOut trafficYellowlight(p5); //Yellow light pin declaration 
DigitalIn pedestrainButton(p8); //Switch button pin declaration 
int main() {
    while(1) 
    {
        
         trafficYellowlight=0; //Initialize Yellow light to ON
        trafficYellowlight=!pedestrainButton; // Switching OFF when Button is Pressed
             wait_ms(500);
               }
         }