Modified version of the UKESF lab source which can be carried out with no knowledge of C

Fork of PsiSwarm-Headstart by UKESF Headstart Summer School

Committer:
jah128
Date:
Fri Mar 11 13:51:24 2016 +0000
Revision:
2:c6986ee3c7c5
Parent:
0:d6269d17c8cf
Child:
4:dc77a25f29de
Added Alex' IR functions

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jah128 0:d6269d17c8cf 1 /* University of York Robotics Laboratory PsiSwarm Library: Motor Functions Header File
jah128 0:d6269d17c8cf 2 *
jah128 0:d6269d17c8cf 3 * File: motors.h
jah128 0:d6269d17c8cf 4 *
jah128 0:d6269d17c8cf 5 * (C) Dept. Electronics & Computer Science, University of York
jah128 0:d6269d17c8cf 6 * James Hilder, Alan Millard, Alexander Horsfield, Homero Elizondo, Jon Timmis
jah128 0:d6269d17c8cf 7 *
jah128 2:c6986ee3c7c5 8 * PsiSwarm Library Version: 0.41
jah128 0:d6269d17c8cf 9 *
jah128 2:c6986ee3c7c5 10 * March 2016
jah128 0:d6269d17c8cf 11 *
jah128 0:d6269d17c8cf 12 *
jah128 0:d6269d17c8cf 13 */
jah128 0:d6269d17c8cf 14
jah128 0:d6269d17c8cf 15 #ifndef MOTORS_H
jah128 0:d6269d17c8cf 16 #define MOTORS_H
jah128 0:d6269d17c8cf 17
jah128 0:d6269d17c8cf 18 void set_left_motor_speed(float speed);
jah128 0:d6269d17c8cf 19 void set_right_motor_speed(float speed);
jah128 0:d6269d17c8cf 20 void brake_left_motor(void);
jah128 0:d6269d17c8cf 21 void brake_right_motor(void);
jah128 0:d6269d17c8cf 22 void brake(void);
jah128 0:d6269d17c8cf 23 void stop(void);
jah128 0:d6269d17c8cf 24 void forward(float speed);
jah128 0:d6269d17c8cf 25 void backward(float speed);
jah128 0:d6269d17c8cf 26 void turn(float speed);
jah128 0:d6269d17c8cf 27
jah128 0:d6269d17c8cf 28 // New time based functions (library v0.3)
jah128 0:d6269d17c8cf 29 void time_based_forward(float speed, int microseconds, char brake);
jah128 0:d6269d17c8cf 30 void time_based_turn(float speed, int microseconds, char brake);
jah128 0:d6269d17c8cf 31 int time_based_turn_degrees(float speed, float degrees, char brake);
jah128 0:d6269d17c8cf 32 float get_maximum_turn_angle(int microseconds);
jah128 0:d6269d17c8cf 33 int get_time_based_turn_time(float speed, float degrees);
jah128 0:d6269d17c8cf 34 void IF_check_time_for_existing_time_based_action();
jah128 0:d6269d17c8cf 35 void IF_end_time_based_action();
jah128 0:d6269d17c8cf 36
jah128 0:d6269d17c8cf 37 void IF_update_motors();
jah128 0:d6269d17c8cf 38 float IF_calibrated_speed(float speed);
jah128 0:d6269d17c8cf 39 void IF_init_motors(void);
jah128 0:d6269d17c8cf 40
jah128 0:d6269d17c8cf 41 #endif