Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed TTU_CSC1300
main.cpp@1:73371dff174b, 2020-11-09 (annotated)
- 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?
| User | Revision | Line number | New 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 | } |