James O'Keeffe
/
BeaconDemo_RobotCodeNew
ft. button press reset
Fork of BeaconDemo_RobotCode by
PsiSwarm/motors.h@9:085e090e1ec1, 2015-10-26 (annotated)
- Committer:
- jah128
- Date:
- Mon Oct 26 11:16:05 2015 +0000
- Revision:
- 9:085e090e1ec1
- Parent:
- 8:00558287a4ef
- Child:
- 13:f5994956b1ba
Fork for variable frequency beacon
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jah128 | 0:8a5497a2e366 | 1 | /* University of York Robotics Laboratory PsiSwarm Library: Motor Functions Header File |
jah128 | 0:8a5497a2e366 | 2 | * |
jah128 | 0:8a5497a2e366 | 3 | * File: motors.h |
jah128 | 0:8a5497a2e366 | 4 | * |
jah128 | 6:ff3c66f7372b | 5 | * (C) Dept. Electronics & Computer Science, University of York |
jah128 | 6:ff3c66f7372b | 6 | * James Hilder, Alan Millard, Homero Elizondo, Jon Timmis |
jah128 | 0:8a5497a2e366 | 7 | * |
jah128 | 6:ff3c66f7372b | 8 | * PsiSwarm Library Version: 0.3 |
jah128 | 0:8a5497a2e366 | 9 | * |
jah128 | 6:ff3c66f7372b | 10 | * October 2015 |
jah128 | 0:8a5497a2e366 | 11 | * |
jah128 | 0:8a5497a2e366 | 12 | */ |
jah128 | 0:8a5497a2e366 | 13 | |
jah128 | 0:8a5497a2e366 | 14 | #ifndef MOTORS_H |
jah128 | 0:8a5497a2e366 | 15 | #define MOTORS_H |
jah128 | 0:8a5497a2e366 | 16 | |
jah128 | 0:8a5497a2e366 | 17 | void set_left_motor_speed(float speed); |
jah128 | 0:8a5497a2e366 | 18 | void set_right_motor_speed(float speed); |
jah128 | 0:8a5497a2e366 | 19 | void brake_left_motor(void); |
jah128 | 0:8a5497a2e366 | 20 | void brake_right_motor(void); |
jah128 | 0:8a5497a2e366 | 21 | void brake(void); |
jah128 | 0:8a5497a2e366 | 22 | void stop(void); |
jah128 | 0:8a5497a2e366 | 23 | void forward(float speed); |
jah128 | 0:8a5497a2e366 | 24 | void backward(float speed); |
jah128 | 0:8a5497a2e366 | 25 | void turn(float speed); |
jah128 | 0:8a5497a2e366 | 26 | |
jah128 | 9:085e090e1ec1 | 27 | // New time based functions (library v0.3) |
jah128 | 9:085e090e1ec1 | 28 | void time_based_forward(float speed, int microseconds, char brake); |
jah128 | 9:085e090e1ec1 | 29 | void time_based_turn(float speed, int microseconds, char brake); |
jah128 | 9:085e090e1ec1 | 30 | int time_based_turn_degrees(float speed, float degrees, char brake); |
jah128 | 9:085e090e1ec1 | 31 | int get_time_based_turn_time(float speed, float degrees); |
jah128 | 9:085e090e1ec1 | 32 | void IF_check_time_for_existing_time_based_action(); |
jah128 | 8:00558287a4ef | 33 | void IF_end_time_based_action(); |
jah128 | 0:8a5497a2e366 | 34 | |
jah128 | 0:8a5497a2e366 | 35 | void IF_update_motors(); |
jah128 | 0:8a5497a2e366 | 36 | float IF_calibrated_speed(float speed); |
jah128 | 0:8a5497a2e366 | 37 | void IF_init_motors(void); |
jah128 | 0:8a5497a2e366 | 38 | |
jah128 | 0:8a5497a2e366 | 39 | #endif |