Carson Pope / Mbed 2 deprecated CSC_EDUBASEV2_Lab1

Dependencies:   mbed TTU_CSC1300

Committer:
carsonpope
Date:
Mon Nov 09 04:51:59 2020 +0000
Revision:
1:73371dff174b
Parent:
0:d5f427aebc49
Actually works

Who changed what in which revision?

UserRevisionLine numberNew contents of line
carsonpope 0:d5f427aebc49 1 #include "mbed.h"
carsonpope 0:d5f427aebc49 2 #include "TTU_CSC1300.h"
carsonpope 0:d5f427aebc49 3
carsonpope 0:d5f427aebc49 4 //Function prototypes
carsonpope 0:d5f427aebc49 5
carsonpope 0:d5f427aebc49 6 int main() {
carsonpope 0:d5f427aebc49 7 while (TRUE) {
carsonpope 0:d5f427aebc49 8 //solution
carsonpope 1:73371dff174b 9 bool sw5_pressed = sw5;
carsonpope 0:d5f427aebc49 10
carsonpope 1:73371dff174b 11 if( sw5_pressed == 1){
carsonpope 1:73371dff174b 12 led0 = TRUE;
carsonpope 1:73371dff174b 13 led1 = FALSE;
carsonpope 0:d5f427aebc49 14 } else {
carsonpope 1:73371dff174b 15 led0 = FALSE;
carsonpope 1:73371dff174b 16 led1 = TRUE;
carsonpope 0:d5f427aebc49 17 }
carsonpope 0:d5f427aebc49 18 }
carsonpope 0:d5f427aebc49 19 }