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.
Diff: main.cpp
- Revision:
- 1:5b0303768126
- Parent:
- 0:db8d4af513c0
- Child:
- 2:32d2cd7d744b
diff -r db8d4af513c0 -r 5b0303768126 main.cpp
--- a/main.cpp Mon Jan 20 08:46:24 2020 +0000
+++ b/main.cpp Tue Jan 21 11:10:33 2020 +0000
@@ -9,15 +9,25 @@
MCP MCP(SDA, SCL, MCP_ADDRESS);
+Serial pc(USBTX, USBRX);
+
XBEE::ControllerData *controller;
int main() {
+ for(int i = 0; i < 16; i++) {
+ MCP.PinMode(i, INPUT_PULLUP);
+ }
+
while(1) {
controller = XBEE::Controller::GetData();
+ MCP.Update();
/* write ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ */
-
-
+ //for(int i = 0; i < 16; i++) {
+ int a = MCP.Read(7);
+ pc.printf("%d",a);
+ //}
+ pc.printf("\n\r");
}
}