UoD_ME21001_Group_1_16 / Mbed 2 deprecated Exercise2

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
loicb2000
Date:
Tue Oct 08 16:41:36 2019 +0000
Commit message:
Exercise 4

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Oct 08 16:41:36 2019 +0000
@@ -0,0 +1,16 @@
+#include "mbed.h"
+
+DigitalIn switchstate(p17);
+Serial pc(USBTX, USBRX);
+
+int main() {
+       
+       pc.baud(921600);
+       
+       while(1) {
+           pc.printf("switchstate: %i\r", switchstate.read());
+           wait(0.500);
+       }    
+}        
+
+       
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Oct 08 16:41:36 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file