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:
- 2:d3a99fd96468
- Parent:
- 1:648d1f317624
- Child:
- 3:39ae37b9c936
diff -r 648d1f317624 -r d3a99fd96468 main.cpp --- a/main.cpp Wed Apr 18 22:33:00 2012 +0000 +++ b/main.cpp Thu Apr 19 22:26:00 2012 +0000 @@ -4,28 +4,30 @@ LocalFileSystem local("local"); Serial pc(USBTX, USBRX); DigitalOut led(LED1); +DigitalOut solenoid(p29); Wifly wifi(p9, p10, p8); Command * cmd; Bitmap bmp; int main() { + solenoid = 0; pc.baud(460800); printf("Test Airbrush!\r\n"); wifi.createAdhocNetwork(); bmp.openImg("/local/a.bmp"); - bmp.setRow(0); - bmp.closeImg(); - for (int i = 0; i < bmp.getHeight(); i++) { + for (int i=0; i < bmp.getHeight(); i++) { + pc.printf("Row %3d: ", i); bmp.setRow(i); - for (int j =0; j < bmp.getWidth(); j++) { + for (int j=0; j < bmp.getWidth(); j++) { if(bmp.isPixel(j)) { pc.printf("1"); } else { - pc.printf("0"); + pc.printf(" "); } } pc.printf("\n\r"); } + bmp.closeImg(); while (1) { while(pc.readable()) { wifi.putc(pc.getc());