UT CS Bootcamp code for creating a secret knock
Dependencies: MMA8451Q mbed tsi_sensor
Fork of UTCSBootcamp by
Revision 7:2901515f14c2, committed 2013-08-23
- Comitter:
- ccoleman
- Date:
- Fri Aug 23 14:13:28 2013 +0000
- Parent:
- 6:4b101f051a1f
- Child:
- 8:eb1307992dd1
- Commit message:
- Updated init and finish functions for a more clean set/reset.
Changed in this revision
Includes/CarBaseAPI.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/Includes/CarBaseAPI.h Fri Aug 23 00:43:43 2013 +0000 +++ b/Includes/CarBaseAPI.h Fri Aug 23 14:13:28 2013 +0000 @@ -130,6 +130,9 @@ if(debug) utrace("initialize()\r\n"); //TFC_TickerObj.attach_us(&TFC_TickerUpdate,1000); //Things go to heck if this is enabled TFC_Init(); + + // init servo position to 0 + TFC_SetServo(0, 0); // Initialize Baud Rate for PC Console pc.baud(38400); @@ -153,7 +156,9 @@ TFC_SetMotorPWM(0.1,0.1); //slight spinning of wheel blinkSequence2(); } - turn(0,0); + + // reset servo position to 0 + TFC_SetServo(0, 0); //reset to straight direction and stop spinning motor TFC_SetMotorPWM(0,0);