code of robot bike
Dependencies: SDFileSystem mbed
Fork of Robot_Bicycle by
Diff: RobotServo.h
- Revision:
- 3:197b748a397a
- Parent:
- 1:709be64ca63c
- Child:
- 4:b0967990e390
--- a/RobotServo.h Tue Jun 21 18:47:22 2016 +0000 +++ b/RobotServo.h Wed Jun 22 04:35:18 2016 +0000 @@ -3,18 +3,18 @@ #define PWM_PERIOD 1.0f/244.0f #define POWER_REDU_PW 0.0001f -#define PWR_REDU_PW 0.0001 //100us ~ 200us +#define PWR_REDU_PW 0.0001f //100us ~ 200us #define PWR_REDU_DUTY_1024 PWR_REDU_PW*244*1024 #define PWR_REDU_DUTY_256 PWR_REDU_PW*244*256 -#define MIN_SERVO_PW 0.0007 //pulse width in second -#define MAX_SERVO_PW 0.0023 //pulse width in second +#define MIN_SERVO_PW 0.0007f //pulse width in second +#define MAX_SERVO_PW 0.0023f //pulse width in second #define MIN_SERVO_DUTY_1024 MIN_SERVO_PW*244*1024 #define MAX_SERVO_DUTY_1024 MAX_SERVO_PW*244*1024 #define MIN_SERVO_DUTY_256 MIN_SERVO_PW*244*256 #define MAX_SERVO_DUTY_256 MAX_SERVO_PW*244*256 -#define Ts 0.004098 -#define pi 3.14159 +#define Ts 0.004098f +#define pi 3.14159f #define H_PEDAL_DIVIDER 2 #define M_PEDAL_DIVIDER 3