C++ Library for the PsiSwarm Robot - Version 0.8
Dependents: PsiSwarm_V8_Blank_CPP Autonomia_RndmWlk
Fork of PsiSwarmV7_CPP by
sensors.h@0:d6269d17c8cf, 2016-02-04 (annotated)
- Committer:
- jah128
- Date:
- Thu Feb 04 21:48:54 2016 +0000
- Revision:
- 0:d6269d17c8cf
- Child:
- 2:c6986ee3c7c5
PsiSwarm Library Version 0.4 - Initial Commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jah128 | 0:d6269d17c8cf | 1 | /* University of York Robotics Laboratory PsiSwarm Library: Sensor Functions Header File |
jah128 | 0:d6269d17c8cf | 2 | * |
jah128 | 0:d6269d17c8cf | 3 | * File: sensors.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 | 0:d6269d17c8cf | 8 | * PsiSwarm Library Version: 0.4 |
jah128 | 0:d6269d17c8cf | 9 | * |
jah128 | 0:d6269d17c8cf | 10 | * February 2016 |
jah128 | 0:d6269d17c8cf | 11 | * |
jah128 | 0:d6269d17c8cf | 12 | */ |
jah128 | 0:d6269d17c8cf | 13 | |
jah128 | 0:d6269d17c8cf | 14 | #ifndef SENSORS_H |
jah128 | 0:d6269d17c8cf | 15 | #define SENSORS_H |
jah128 | 0:d6269d17c8cf | 16 | |
jah128 | 0:d6269d17c8cf | 17 | float get_battery_voltage ( void ); |
jah128 | 0:d6269d17c8cf | 18 | float get_current ( void ); |
jah128 | 0:d6269d17c8cf | 19 | float get_dc_voltage ( void ); |
jah128 | 0:d6269d17c8cf | 20 | |
jah128 | 0:d6269d17c8cf | 21 | float get_temperature ( void ); |
jah128 | 0:d6269d17c8cf | 22 | void enable_ultrasonic_ticker( void ); |
jah128 | 0:d6269d17c8cf | 23 | void disable_ultrasonic_ticker( void ); |
jah128 | 0:d6269d17c8cf | 24 | void update_ultrasonic_measure ( void ); |
jah128 | 0:d6269d17c8cf | 25 | void IF_read_ultrasonic_measure ( void ); |
jah128 | 0:d6269d17c8cf | 26 | float read_reflected_ir_distance ( char index ); |
jah128 | 0:d6269d17c8cf | 27 | float get_reflected_ir_distance ( char index ); |
jah128 | 0:d6269d17c8cf | 28 | unsigned short get_background_raw_ir_value ( char index ); |
jah128 | 0:d6269d17c8cf | 29 | unsigned short get_illuminated_raw_ir_value ( char index ); |
jah128 | 0:d6269d17c8cf | 30 | void store_reflected_ir_distances ( void ); |
jah128 | 0:d6269d17c8cf | 31 | void store_background_raw_ir_values ( void ); |
jah128 | 0:d6269d17c8cf | 32 | void store_illuminated_raw_ir_values ( void ); |
jah128 | 0:d6269d17c8cf | 33 | float calculate_reflected_distance ( unsigned short background_value, unsigned short illuminated_value ); |
jah128 | 0:d6269d17c8cf | 34 | unsigned short read_illuminated_raw_ir_value ( char index ) ; |
jah128 | 0:d6269d17c8cf | 35 | |
jah128 | 0:d6269d17c8cf | 36 | unsigned short get_background_base_ir_value ( char index ); |
jah128 | 0:d6269d17c8cf | 37 | unsigned short get_illuminated_base_ir_value ( char index ); |
jah128 | 0:d6269d17c8cf | 38 | |
jah128 | 0:d6269d17c8cf | 39 | int get_bearing_from_ir_array ( unsigned short * ir_sensor_readings); |
jah128 | 0:d6269d17c8cf | 40 | void store_ir_values ( void ); |
jah128 | 0:d6269d17c8cf | 41 | void store_base_ir_values ( void ); |
jah128 | 0:d6269d17c8cf | 42 | void store_background_base_ir_values ( void ); |
jah128 | 0:d6269d17c8cf | 43 | void store_illuminated_base_ir_values ( void ); |
jah128 | 0:d6269d17c8cf | 44 | |
jah128 | 0:d6269d17c8cf | 45 | void store_line_position ( void ); |
jah128 | 0:d6269d17c8cf | 46 | void calibrate_base_ir_sensors ( void ); |
jah128 | 0:d6269d17c8cf | 47 | |
jah128 | 0:d6269d17c8cf | 48 | #endif |