arduino stuffs
Diffstat (limited to 'car_driver/arduino/motor_utils.h')
-rw-r--r--car_driver/arduino/motor_utils.h19
1 files changed, 0 insertions, 19 deletions
diff --git a/car_driver/arduino/motor_utils.h b/car_driver/arduino/motor_utils.h
deleted file mode 100644
index cb40b1b..0000000
--- a/car_driver/arduino/motor_utils.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef MOTOR_UTILS_H
-#define MOTOR_UTILS_H
-
-namespace motor_utils {
-// @param direction LOW is backwards, HIGH is forward
-// @param speed 0-255
-inline void set(uint8_t motor_pin, uint8_t brake_pin, uint8_t speed_pin,
- int8_t direction, uint8_t speed) {
- digitalWrite(motor_pin, direction);
- digitalWrite(brake_pin, LOW); // brake off
- analogWrite(speed_pin, speed); // speed up
-}
-
-inline void brake(uint8_t brake_pin, uint8_t speed_pin) {
- digitalWrite(brake_pin, HIGH); // engage brake
- analogWrite(speed_pin, 0); // slow
-}
-} // namespace motor_utils
-#endif \ No newline at end of file