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.
Dependencies: mbed
Fork of Dragonfly_DigitalIn_BusIn_Example by
Diff: main.cpp
- Revision:
- 2:cecc69d42fc6
- Parent:
- 1:5770646ab65b
--- a/main.cpp Thu Oct 01 20:30:58 2015 +0000
+++ b/main.cpp Fri Oct 02 17:09:01 2015 +0000
@@ -1,7 +1,7 @@
-/** Dragonfly DigitalIn and BusIn Example Program
+/** mDot DigitalIn and BusIn Example Program
*
* This program demonstrates how to read digital inputs using the
- * MultiTech Dragonfly and MultiTech UDK2 hardware. The only
+ * MultiTech mDot and MultiTech UDK2 hardware. The only
* additional hardware required is jumper wires.
*
* Pins are active low, so 0V = 0 and 5V/3.3V = 1.
@@ -13,11 +13,11 @@
#include "mbed.h"
int main() {
- // read digital pins D9 and D10 as a 2 pin bus
+ // read digital pins PA_4 and PA_6 (UDK2 pins D10 and D12) as a 2 pin bus
// the first pin is the LSB of the bus, the last is the MSB
- BusIn bus(D9, D10);
- // read digital pin D12
- DigitalIn din(D12);
+ BusIn bus(PA_4, PA_6);
+ // read digital pin PA_5 (UDK2 pin D13)
+ DigitalIn din(PA_5);
int old_bus = -1;
int old_din = -1;
