kh
Dependencies: mbed PinDetect Servo
Diff: actuators.cpp
- Revision:
- 0:28e05e1a3d1e
- Child:
- 1:2c365f6da61d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/actuators.cpp Sat Nov 10 19:30:54 2018 +0000 @@ -0,0 +1,53 @@ +/* +* Authors: Group 4 Adam Elghor, Brian Kaplan, Sayak Chatterjee, Moraa Onwonga +* Purpose: Controls the actuators of the safe +* Language: NBC +*/ +#include "actuators.h" +#include "parameters.h" +#include "mbed.h" +/* +* Function: turnsRcServosRight +* -------------------- +* Turns the servos to the right +* +* +*/ +void turnsRcServosRight() { + rcServo1 = 1.0f; + rcServo2 = 1.0f; +} + +/* +* Function: urnsRcServosLeft +* -------------------- +* Turns the servos to the right +* +* +*/ +void turnsRcServosLeft() { + rcServo1 = -1.0f; + rcServo2 = -1.0f; +} + + +/* +* Function: openSafe +* -------------------- +* Opens the safe +*/ +void openSafe() { + turnsRcServosRight(); +} + +/* +* Function: lockSafe +* -------------------- +* Locks the safe +*/ +void lockSafe() { + turnsRcServosLeft(); +} + + +