Task 3.2.1
Fork of Task321 by
main.cpp
- Committer:
- noutram
- Date:
- 2019-09-11
- Revision:
- 2:688437caece6
- Parent:
- 0:d9322feedf3a
File content as of revision 2:688437caece6:
#include "mbed.h" DigitalOut red_led(D7); DigitalOut yellow_led(D6); DigitalOut green_led(D5); DigitalIn SW1(D4); int main() { //Switch on Yellow and Green to indicate //that the code is running yellow_led = 1; green_led = 1; red_led = 0; //Set RED LED to OFF // Wait for SW1 to be pressed while (SW1 == 0) { } red_led = 1; //Turn ON LED while (1) { } //Repeat forever }