![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Demo using the user button and serial port on the Nucleo board, for Stage 1 Engineering at the University of York
Diff: main.cpp
- Revision:
- 2:bc854fc3d2a3
- Parent:
- 1:ee571cefc13b
- Child:
- 3:e09e8c0d8dea
diff -r ee571cefc13b -r bc854fc3d2a3 main.cpp --- a/main.cpp Thu Aug 27 10:14:27 2020 +0000 +++ b/main.cpp Mon Sep 28 16:03:05 2020 +0000 @@ -1,4 +1,3 @@ - #include "mbed.h" int main() @@ -12,7 +11,7 @@ // Loop forever... while (true) { // Is the button being pressed? - if (button) { + if (button == true) { pc.printf("Button is up\n"); } else { pc.printf("Button is down\n");