![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Bluetooth communication for flocking.
Fork of BeautifulMemeProject by
PsiSwarm/sensors.h@27:7eb032772bc2, 2016-01-31 (annotated)
- Committer:
- alanmillard
- Date:
- Sun Jan 31 15:14:54 2016 +0000
- Revision:
- 27:7eb032772bc2
- Parent:
- 6:ff3c66f7372b
Flocking seems to work better now, however the robot controller sometimes "crashes" (unsure why).
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: Sensor Functions Header File |
jah128 | 0:8a5497a2e366 | 2 | * |
jah128 | 0:8a5497a2e366 | 3 | * File: sensors.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 | 6:ff3c66f7372b | 9 | * |
jah128 | 6:ff3c66f7372b | 10 | * October 2015 |
jah128 | 0:8a5497a2e366 | 11 | * |
jah128 | 0:8a5497a2e366 | 12 | */ |
jah128 | 0:8a5497a2e366 | 13 | |
jah128 | 0:8a5497a2e366 | 14 | #ifndef SENSORS_H |
jah128 | 0:8a5497a2e366 | 15 | #define SENSORS_H |
jah128 | 0:8a5497a2e366 | 16 | |
jah128 | 0:8a5497a2e366 | 17 | float get_battery_voltage ( void ); |
jah128 | 0:8a5497a2e366 | 18 | float get_current ( void ); |
jah128 | 0:8a5497a2e366 | 19 | float get_dc_voltage ( void ); |
jah128 | 0:8a5497a2e366 | 20 | |
jah128 | 0:8a5497a2e366 | 21 | float get_temperature ( void ); |
jah128 | 0:8a5497a2e366 | 22 | void enable_ultrasonic_ticker( void ); |
jah128 | 0:8a5497a2e366 | 23 | void disable_ultrasonic_ticker( void ); |
jah128 | 0:8a5497a2e366 | 24 | void update_ultrasonic_measure ( void ); |
jah128 | 0:8a5497a2e366 | 25 | void IF_read_ultrasonic_measure ( void ); |
jah128 | 0:8a5497a2e366 | 26 | float read_reflected_ir_distance ( char index ); |
jah128 | 0:8a5497a2e366 | 27 | float get_reflected_ir_distance ( char index ); |
jah128 | 0:8a5497a2e366 | 28 | unsigned short get_background_raw_ir_value ( char index ); |
jah128 | 0:8a5497a2e366 | 29 | unsigned short get_illuminated_raw_ir_value ( char index ); |
jah128 | 0:8a5497a2e366 | 30 | void store_reflected_ir_distances ( void ); |
jah128 | 0:8a5497a2e366 | 31 | void store_background_raw_ir_values ( void ); |
jah128 | 0:8a5497a2e366 | 32 | void store_illuminated_raw_ir_values ( void ); |
jah128 | 0:8a5497a2e366 | 33 | float calculate_reflected_distance ( unsigned short background_value, unsigned short illuminated_value ); |
jah128 | 0:8a5497a2e366 | 34 | unsigned short read_illuminated_raw_ir_value ( char index ) ; |
jah128 | 0:8a5497a2e366 | 35 | |
jah128 | 0:8a5497a2e366 | 36 | unsigned short get_background_base_ir_value ( char index ); |
jah128 | 0:8a5497a2e366 | 37 | unsigned short get_illuminated_base_ir_value ( char index ); |
jah128 | 6:ff3c66f7372b | 38 | |
jah128 | 6:ff3c66f7372b | 39 | int get_bearing_from_ir_array ( unsigned short * ir_sensor_readings); |
jah128 | 0:8a5497a2e366 | 40 | void store_ir_values ( void ); |
jah128 | 0:8a5497a2e366 | 41 | void store_base_ir_values ( void ); |
jah128 | 0:8a5497a2e366 | 42 | void store_background_base_ir_values ( void ); |
jah128 | 0:8a5497a2e366 | 43 | void store_illuminated_base_ir_values ( void ); |
jah128 | 0:8a5497a2e366 | 44 | |
jah128 | 3:cd048f6e544e | 45 | void store_line_position ( void ); |
jah128 | 0:8a5497a2e366 | 46 | void calibrate_base_ir_sensors ( void ); |
jah128 | 0:8a5497a2e366 | 47 | |
jah128 | 0:8a5497a2e366 | 48 | #endif |