+3度のやつ
Dependencies: ADXL345_I2C Control_Yokutan_CANver1 mbed
Fork of Souda_Yokutan_ver4 by
Diff: main.cpp
- Revision:
- 14:1f6dd929d7de
- Parent:
- 13:5e3b4120dbbf
- Child:
- 15:1db5ee4fe7ce
--- a/main.cpp Sat Feb 27 04:33:21 2016 +0000 +++ b/main.cpp Sat Feb 27 11:36:09 2016 +0000 @@ -11,15 +11,15 @@ #define ADXL_MEAN_NUM 10 #define SEND_DATAS_LOOP_TIME 0.1 -#define ERURON_MOVE_DEG_INI_R 1 -#define DRUG_MOVE_DEG_INI_R 1 -#define ERURON_TRIM_INI_R 1 -#define DRUG_TRIM_INI_R 1 +#define ERURON_MOVE_DEG_INI_R 55 +#define DRUG_MOVE_DEG_INI_R 96 +#define ERURON_TRIM_INI_R 41 +#define DRUG_TRIM_INI_R 3 -#define ERURON_MOVE_DEG_INI_L 2 -#define DRUG_MOVE_DEG_INI_L 2 -#define ERURON_TRIM_INI_L 2 -#define DRUG_TRIM_INI_L 2 +#define ERURON_MOVE_DEG_INI_L 29 +#define DRUG_MOVE_DEG_INI_L 87 +#define ERURON_TRIM_INI_L 79 +#define DRUG_TRIM_INI_L 92 CAN can(p30,p29); CANMessage recmsg; @@ -175,7 +175,9 @@ drugTrim = drugAna.read()*180; drugServo.pulsewidth(calcPulse(drugTrim)); } - pc.printf("eruronTrim:%f drugTrim:%f\n\r",eruronTrim,drugTrim); + //pc.printf("eruronTrim:%f drugTrim:%f\n\r",eruronTrim,drugTrim); + pc.printf("eruronTrim:%f drugTrim:%f ",eruronTrim,drugTrim); + pc.printf("eMD:%f dMD:%f\n\r",eruronMoveDeg,drugMoveDeg); } void checkMaxDeg(){ @@ -190,7 +192,9 @@ drugServo.pulsewidth(calcPulse(drugTemp)); drugMoveDeg = drugTemp-drugTrim; } - pc.printf("eMD:%f dMD:%f\n\r",eruronMoveDeg,drugMoveDeg); + // pc.printf("eMD:%f dMD:%f\n\r",eruronMoveDeg,drugMoveDeg); + pc.printf("eruronTrim:%f drugTrim:%f ",eruronTrim,drugTrim); + pc.printf("eMD:%f dMD:%f\n\r",eruronMoveDeg,drugMoveDeg); wait_us(10); } @@ -203,8 +207,11 @@ while(checkMaxDegPin){ checkMaxDeg(); } - pc.printf("eT:%f\n\r",eruronTrim); + // pc.printf("eT:%f\n\r",eruronTrim); + pc.printf("eruronTrim:%f drugTrim:%f ",eruronTrim,drugTrim); + pc.printf("eMD:%f dMD:%f\n\r",eruronMoveDeg,drugMoveDeg); led4 = 0; + debugLED = 0; receiveDatas(); WriteServo();