エレキジャック Web版 マイコン・カーを製作してみよう<21> マイコンカー制御プログラムです。http://www.eleki-jack.com/arm/2012/10/21.html このプログラムは次回の記事でアップされるパソコン用プログラムを使ってマイコンカーを制御するプログラムです。マイコンカーとパソコンの通信はXbeeを使っています。
Diff: main.cpp
- Revision:
- 2:9758930faa7e
- Parent:
- 1:8f2a9b48a9e0
- Child:
- 3:ba97046adcd1
diff -r 8f2a9b48a9e0 -r 9758930faa7e main.cpp --- a/main.cpp Sat May 05 15:04:33 2012 +0000 +++ b/main.cpp Sun May 06 09:43:28 2012 +0000 @@ -23,8 +23,8 @@ * Variables. */ static const int CAPTURE_FRAMES = 3; -static const int RAWIMG_X = 80; -static const int RAWIMG_Y = 64; +static const int RAWIMG_X = 320; +static const int RAWIMG_Y = 240; static char buf[RAWIMG_X * RAWIMG_Y * 2]; static FILE *fp_jpeg; @@ -94,15 +94,11 @@ */ int main() { printf("\r\n"); - printf("==========\r\n"); + printf("==========\r\n"); printf("CameraC1098\r\n"); printf("==========\r\n"); - // Camera Reset - //sync(); CameraC1098::ErrorNumber err = CameraC1098::NoError; - camera.setmbedBaud(CameraC1098::Baud14400); - err = camera.init(CameraC1098::Baud14400, CameraC1098::JpegResolution640x480); - + err = camera.init(CameraC1098::Baud460800, CameraC1098::JpegResolution160x128); if (CameraC1098::NoError == err) { printf("[ OK ] : CameraC1098::init\r\n"); @@ -110,8 +106,8 @@ printf("[FAIL] : CameraC1098::init (Error=%02X)\r\n", (int)err); } // - - //test_jpeg_snapshot_picture(); + sync(); + test_jpeg_snapshot_picture(); return 0; }