![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Tutorial for first mbed project
Dependencies: mbed lib_workshop_2019
includes/test_motor.h@4:bf5caf4c0c88, 2019-10-23 (annotated)
- Committer:
- gvaquette
- Date:
- Wed Oct 23 19:25:12 2019 +0000
- Revision:
- 4:bf5caf4c0c88
testing motors and add comments
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
gvaquette | 4:bf5caf4c0c88 | 1 | /** |
gvaquette | 4:bf5caf4c0c88 | 2 | * @author geoffrey Vaquette |
gvaquette | 4:bf5caf4c0c88 | 3 | * |
gvaquette | 4:bf5caf4c0c88 | 4 | * @section DESCRIPTION |
gvaquette | 4:bf5caf4c0c88 | 5 | * |
gvaquette | 4:bf5caf4c0c88 | 6 | * Testing value from ultrasonic sensors on robot |
gvaquette | 4:bf5caf4c0c88 | 7 | * |
gvaquette | 4:bf5caf4c0c88 | 8 | */ |
gvaquette | 4:bf5caf4c0c88 | 9 | |
gvaquette | 4:bf5caf4c0c88 | 10 | #ifndef TEST_MOTOR_H |
gvaquette | 4:bf5caf4c0c88 | 11 | #define TEST_MOTOR_H |
gvaquette | 4:bf5caf4c0c88 | 12 | |
gvaquette | 4:bf5caf4c0c88 | 13 | #include "mbed.h" |
gvaquette | 4:bf5caf4c0c88 | 14 | |
gvaquette | 4:bf5caf4c0c88 | 15 | enum e_direction { |
gvaquette | 4:bf5caf4c0c88 | 16 | FORWARD, |
gvaquette | 4:bf5caf4c0c88 | 17 | BACKWARD |
gvaquette | 4:bf5caf4c0c88 | 18 | }; |
gvaquette | 4:bf5caf4c0c88 | 19 | |
gvaquette | 4:bf5caf4c0c88 | 20 | /// <summary>Sorts the list to by the given column</summary> |
gvaquette | 4:bf5caf4c0c88 | 21 | /// <param name="sel">Column to be sorted (index-1-based) and sort direction (pos. = ascending)</param> |
gvaquette | 4:bf5caf4c0c88 | 22 | /// <returns>Documentation of return type</returns> |
gvaquette | 4:bf5caf4c0c88 | 23 | void ft_run_motor(e_direction direction, double duty_cycle, PwmOut pwm_mot, DigitalOut dirA, DigitalOut dirB); |
gvaquette | 4:bf5caf4c0c88 | 24 | |
gvaquette | 4:bf5caf4c0c88 | 25 | void ft_test_motor(PwmOut pin_pwm_mot, DigitalOut pin_dirA, DigitalOut pin_dirB, Serial &pc); |
gvaquette | 4:bf5caf4c0c88 | 26 | |
gvaquette | 4:bf5caf4c0c88 | 27 | |
gvaquette | 4:bf5caf4c0c88 | 28 | |
gvaquette | 4:bf5caf4c0c88 | 29 | #endif |