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.
main.cpp@0:e653f6cb0a04, 2019-11-21 (annotated)
- Committer:
- cgoodger
- Date:
- Thu Nov 21 13:31:43 2019 +0000
- Revision:
- 0:e653f6cb0a04
Test 4
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| cgoodger | 0:e653f6cb0a04 | 1 | #include "mbed.h" |
| cgoodger | 0:e653f6cb0a04 | 2 | DigitalOut red1(p21); //Assign digital output value of red1 to mbed pin p21 |
| cgoodger | 0:e653f6cb0a04 | 3 | AnalogIn(p17); |
| cgoodger | 0:e653f6cb0a04 | 4 | void do_something(int param1); |
| cgoodger | 0:e653f6cb0a04 | 5 | int global_variable; |
| cgoodger | 0:e653f6cb0a04 | 6 | main() { global_variable = 1; |
| cgoodger | 0:e653f6cb0a04 | 7 | while(1) /* Stay in this loop */ |
| cgoodger | 0:e653f6cb0a04 | 8 | { |
| cgoodger | 0:e653f6cb0a04 | 9 | if( global_variable ) |
| cgoodger | 0:e653f6cb0a04 | 10 | red1=1; |
| cgoodger | 0:e653f6cb0a04 | 11 | } |
| cgoodger | 0:e653f6cb0a04 | 12 | } |