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: JPEGCamera SDFileSystem mbed
Fork of SaibiCansat2014 by
Revision 8:3230ddd3a3d1, committed 2014-07-17
- Comitter:
- TakashiSasaki
- Date:
- Thu Jul 17 23:30:16 2014 +0000
- Parent:
- 7:cc8080b31ac5
- Child:
- 9:3a2d25f4700b
- Commit message:
- LinkSprite at 115200bps
Changed in this revision
| FastJpegCamera.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/FastJpegCamera.h Thu Jul 17 23:17:45 2014 +0000
+++ b/FastJpegCamera.h Thu Jul 17 23:30:16 2014 +0000
@@ -12,7 +12,7 @@
Serial pc;
FastJpegCamera(PinName tx, PinName rx) : JPEGCamera(tx,rx), baudrate(38400), pc(USBTX, USBRX), myled1(LED1){
- this->baud38400();
+ this->baud115200();
};
void baud115200(){
@@ -20,6 +20,7 @@
//char buf[5] = {0x56, 0x00, 0x34, 0x0d, 0xa6};
//int ret = sendReceive(buf, sizeof buf, 5);
for (int i = 0; i < sizeof buf; i++) putc(buf[i]);
+ wait(0.5);
this->baudrate = 115200;
this->baud(this->baudrate);
wait(4);
@@ -40,11 +41,15 @@
void baud38400(){
char buf[7] = {0x56, 0x00, 0x24, 0x03, 0x01, 0x2a, 0xf2};
- int ret = sendReceive(buf, sizeof buf, 5);
+ //int ret = sendReceive(buf, sizeof buf, 5);
+ for (int i = 0; i < sizeof buf; i++) putc(buf[i]);
wait(0.5);
//this->reset();
this->baudrate = 38400;
this->baud(this->baudrate);
+ wait(4);
+ //this->reset();
+ receive(buf, 5, 500);
pc.printf("%02x %02x %02x %02x %02x", buf[0], buf[1], buf[2], buf[3], buf[4]);
};
