Fumiya Fujisawa
/
BallMany_OneFun_Demo
IRsensor DemoProgram
Diff: main.cpp
- Revision:
- 1:6c4524bbb546
- Parent:
- 0:99f4010878fa
--- a/main.cpp Fri Feb 21 07:23:20 2014 +0000 +++ b/main.cpp Fri Feb 28 08:29:03 2014 +0000 @@ -5,13 +5,13 @@ #include "mbed.h" #define BREAKPT_IR 833 -#define ERROR_IR 0 +#define ERROR_IR 0xFFF //#define OVERLINE_IR 46 -#define ALL_IR 10 +#define ALL_IR 1 volatile unsigned int ave[ALL_IR] = {0}; Serial pc(USBTX,USBRX);//tx,rx Timer time_ir; -PinName num_ir[ALL_IR] = {p21,p22,p23,p24,p25,p26,p27,p28,p29,p30}; +PinName num_ir[ALL_IR] = {p21/*,p22,p23,p24,p25,p26,p27,p28,p29,p30*/}; unsigned int moving_ave(int num,unsigned int data){ static unsigned int sum[ALL_IR] = {0};