diff --git a/src/motion/Motion.cpp b/src/motion/Motion.cpp new file mode 100644 index 0000000..028aed3 --- /dev/null +++ b/src/motion/Motion.cpp @@ -0,0 +1,41 @@ +/** + * @file Motion.cpp + * @author Jonathan Schulze, Nick Hübenthal + * @brief Implementation of the Motion class. + * @version 0.1 + * @date 2023-12-13 + * + * @copyright Copyright (c) 2023 + * + */ + +#include "Motion.h" + +// Constructor +Motion::Motion() { + +} + +// Initialize the movement component. +void Motion::begin(void) { + +} + +// Move forward for a certain amount of time. +void Motion::move(uint32_t moveForMs) { + analogWrite(MOTOR_LEFT_PIN, 128); + analogWrite(MOTOR_RIGHT_PIN, 128); + vTaskDelay(moveForMs); + analogWrite(MOTOR_LEFT_PIN, 0); + analogWrite(MOTOR_RIGHT_PIN, 0); +} + +// Rotate clockwise for a certain amount of time. +void Motion::rotateClockwise(uint32_t rotateForMs) { + +} + +// Rotate anticlockwise for a certain amount of time. +void Motion::rotateAnticlockwise(uint32_t rotateForMs) { + +}