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:
- 3:39ae37b9c936
- Parent:
- 2:d3a99fd96468
--- a/main.cpp Thu Apr 19 22:26:00 2012 +0000
+++ b/main.cpp Sat Apr 21 02:21:31 2012 +0000
@@ -14,7 +14,7 @@
pc.baud(460800);
printf("Test Airbrush!\r\n");
wifi.createAdhocNetwork();
- bmp.openImg("/local/a.bmp");
+ /* bmp.openImg("/local/a.bmp");
for (int i=0; i < bmp.getHeight(); i++) {
pc.printf("Row %3d: ", i);
bmp.setRow(i);
@@ -27,7 +27,7 @@
}
pc.printf("\n\r");
}
- bmp.closeImg();
+ bmp.closeImg();*/
while (1) {
while(pc.readable()) {
wifi.putc(pc.getc());
@@ -40,13 +40,18 @@
switch(cmd->cmd) {
case 0x00:
pc.printf("Move to x: %d, y:%d, z:%d\n\r", cmd->l[0], cmd->l[1], cmd->l[2]);
- wait(3);
- wifi.send("Done"); // Make sure to always send confirmation
+ wait(2);
break;
default:
pc.printf("You should probably do something with case %x\n\r", cmd->cmd);
- wifi.send("No code");
}
+ cmd->cmd = 8;
+ cmd->l[0] = 100;
+ cmd->l[1] = 300;
+ cmd->l[2] = 0;
+ cmd->f[3] = 0.5;
+ cmd->f[4] = 0.0;
+ wifi.sendCmd(cmd);
}
}
}