Fianna Stenveld
/
Assignment_2
Assignement_2_c
Fork of Minor_test_serial by
Diff: main.cpp
- Revision:
- 2:161481e810dc
- Parent:
- 1:40470bc517f1
- Child:
- 3:d826445e3ce3
diff -r 40470bc517f1 -r 161481e810dc main.cpp --- a/main.cpp Mon Sep 11 10:42:39 2017 +0000 +++ b/main.cpp Tue Sep 11 13:49:23 2018 +0000 @@ -6,14 +6,17 @@ int main() { - int i = 0; pc.baud(115200); - pc.printf("Hello World!\r\n"); + + + char c; + c = pc.getc(); + + pc.printf("input user: %c\n", c); while (true) { - wait(0.5f); // wait a small period of time - pc.printf("%d \r\n", i); // print the value of variable i - i++; // increment the variable - myled = !myled; // toggle a led + myled = !myled; + wait(0.3f); + } }