譯文 張
/
7_7Boboobooo
123
Fork of Boboobooo by
main.cpp
- Committer:
- backman
- Date:
- 2014-06-04
- Revision:
- 3:c5f2281b3ed2
- Parent:
- 2:c51647d3c14d
- Child:
- 6:b046d6ff3745
File content as of revision 3:c5f2281b3ed2:
#include "mbed.h" #include "servo_api.h" #include "camera_api.h" #define Debug_cam_uart Serial pc(USBTX, USBRX); BX_servo servo; BX_camera cam; int main() { /* int black_va; int white_va; */ #ifdef Debug_cam_uart pc.baud(115200); while(1){ cam.read(); for(int i=0;i<128;i++){ if(i==64) pc.printf("X"); else pc.printf("%c", cam.sign_line_imageL[i]); } pc.printf(" || "); for(int i=0;i<128;i++){ if(i==64) pc.printf("X"); else pc.printf("%c", cam.sign_line_imageR[i]); } pc.printf("\r\n"); pc.printf("R center : %d \r\nL center: %d\r\n",cam.black_centerR(),cam.black_centerL()); } // pc.printf("ang :%d\r\n ",( (64.0-center) /64.0 )*90); //-------------------------------------------- // servo.set_angle(( (64.0-center) /64.0 )*90 ); #endif return 0; }