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.
Revision 1:49089afba57b, committed 2013-05-02
- Comitter:
- hnoons
- Date:
- Thu May 02 16:01:01 2013 +0000
- Parent:
- 0:b41e9479d15b
- Commit message:
- main
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r b41e9479d15b -r 49089afba57b main.cpp
--- a/main.cpp Thu May 02 14:23:16 2013 +0000
+++ b/main.cpp Thu May 02 16:01:01 2013 +0000
@@ -3,15 +3,17 @@
Serial xbee1(p9, p10);
DigitalOut rst1(p11);
-Serial sndpn(p14, p13);
+Serial sndpn(p13, p14);
DigitalOut myled(LED1);
DigitalOut myled2(LED2);
-//DigitalIn flag(p8);
+DigitalIn ready(p8);
+DigitalIn flag(
TextLCD lcd(p15, p16, p17, p18, p19, p20);
int main() {
+
rst1 = 0; //Set reset pin to 0
myled = 0;
myled2= 0;
@@ -23,11 +25,11 @@
wait(2);
lcd.cls();
- int id;
- int PIN;
- int idPIN;
+ //printf("hello\n");
while(1)
{
+ int id = 0;
+ int PIN = 0;
myled = 1;
if (xbee1.readable())
{
@@ -37,11 +39,10 @@
// prev = data;
wait(0.01);
lcd.printf(" Pin: %d", PIN);
+ //lcd.printf(" ID:%d", id);
+ {
- while(1) {
-
- idPIN = (id*10000)+PIN;
- sndpn.printf("%d \r", idPIN);
+ sndpn.printf("%d %d \r", id, PIN);
wait(10);
}
}