diff options
| author | Dawsyn Schraiber <[email protected]> | 2024-06-13 14:30:58 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-06-13 14:30:58 -0400 |
| commit | 58b4bc754bbb9f5197119cd0c124e49c05acff46 (patch) | |
| tree | 8a65e23756374626e2c9cb997af9d8ed6f892390 /tools/servo_test.cpp | |
| parent | 8fbd08fe29bbc2246a78b481b219c241f62ff420 (diff) | |
| download | active-drag-system-58b4bc754bbb9f5197119cd0c124e49c05acff46.tar.gz active-drag-system-58b4bc754bbb9f5197119cd0c124e49c05acff46.tar.bz2 active-drag-system-58b4bc754bbb9f5197119cd0c124e49c05acff46.zip | |
Where to begin…. (#13)
+/- Reworked collection of altimeter related functions into altimeter class
+/- Reworked bno055 class to be imu class with minimal functionality
\- Removed external Kalman filter implementations in favor of own in house version
\- Removed any/unused files
\+ Added buffer logger for when sitting on pad for extended period of time in effort to prevent filling of flash chip
\+ Added heartbeat LED for alive status
Diffstat (limited to 'tools/servo_test.cpp')
| -rw-r--r-- | tools/servo_test.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tools/servo_test.cpp b/tools/servo_test.cpp new file mode 100644 index 0000000..c5e8e6e --- /dev/null +++ b/tools/servo_test.cpp @@ -0,0 +1,27 @@ +#include <stdio.h> +#include <inttypes.h> +#include "pico/stdio.h" +#include "pwm.hpp" + +#define MOSFET_PIN 1 + +PWM pwm; + +int main() { + stdio_init_all(); + // Initialize MOSFET + gpio_init(MOSFET_PIN); + gpio_set_dir(MOSFET_PIN, GPIO_OUT); + gpio_put(MOSFET_PIN, 1); + pwm.init(); + uint8_t duty_cycle = 13; + while (1) { + getchar(); + if (duty_cycle == 2) { + duty_cycle = 13; + } + pwm.set_duty_cycle(duty_cycle); + printf("Currenty Duty Cycle: %" PRIu8 "\n", duty_cycle); + duty_cycle--; + } +} |
