Raspberry Pi Camera
Diff: QQQCAM.h
- Revision:
- 1:546f9ce8f4c0
- Parent:
- 0:7a6b30b678c7
--- a/QQQCAM.h Sat Sep 19 09:58:31 2020 +0000 +++ b/QQQCAM.h Sat Sep 19 10:05:44 2020 +0000 @@ -1,6 +1,25 @@ #ifndef QQQCAM_H #define QQQCAM_H +/* +Raspberry Piに接続したカメラは毎秒1回撮影を行い,画像の赤い部分の割合を"$CAM,d.ddd\r\n"のフォーマットで送信する. +このライブラリは,シリアル受信割り込みを利用して内部のパラメータを更新する. + +#include "mbed.h" +#include "QQQCAM.h" + +Serial pc(USBTX, USBRX, 115200); +Serial cam_serial(p28, p27, 115200); + +QQQCAM cam(cam_serial); + +int main() +{ + while(1) { + pc.printf("rate:%.3f\r\n", cam.get_rate()); + } +} +*/ class QQQCAM{ private: Serial *_serial;