Cyrus Goodger / Mbed 2 deprecated Project_Test_4

Dependencies:   mbed

Committer:
cgoodger
Date:
Thu Nov 21 13:31:43 2019 +0000
Revision:
0:e653f6cb0a04
Test 4

Who changed what in which revision?

UserRevisionLine numberNew 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 }