WallbotBLE default code
Dependencies: mbed
Fork of BLE_WallbotBLE_Challenge by
Revision 2:3c406d25860e, committed 2015-02-20
- Comitter:
- jksoft
- Date:
- Fri Feb 20 00:07:48 2015 +0000
- Parent:
- 1:a86c84ead24a
- Commit message:
- Wallbot BLE??????????
Changed in this revision
diff -r a86c84ead24a -r 3c406d25860e TB6612FNG/TB6612.cpp --- a/TB6612FNG/TB6612.cpp Tue Nov 18 04:28:02 2014 +0000 +++ b/TB6612FNG/TB6612.cpp Fri Feb 20 00:07:48 2015 +0000 @@ -43,8 +43,11 @@ // float speed -1.0 - 0.0 - 1.0 float TB6612::speed(float speed) { + + if( speed > 0.0 ) { + if( speed > 0.7) speed = 0.7; _pwm = speed; _fwd = 1; _rev = 0; @@ -52,6 +55,7 @@ } else if( speed < 0.0 ) { + if( speed < -0.7) speed = -0.7; _pwm = -speed; _fwd = 0; _rev = 1;
diff -r a86c84ead24a -r 3c406d25860e main.cpp --- a/main.cpp Tue Nov 18 04:28:02 2014 +0000 +++ b/main.cpp Fri Feb 20 00:07:48 2015 +0000 @@ -19,7 +19,7 @@ AnalogIn fsen2(P0_3); AnalogIn fsen3(P0_4); AnalogIn fsen4(P0_5); -#if 1 +#if 0 TB6612 left(P0_29,P0_23,P0_24); TB6612 right(P0_28,P0_30,P0_0); #else
diff -r a86c84ead24a -r 3c406d25860e mbed.bld --- a/mbed.bld Tue Nov 18 04:28:02 2014 +0000 +++ b/mbed.bld Fri Feb 20 00:07:48 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/031413cf7a89 \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/9ad691361fac \ No newline at end of file