Bluetooth communication for flocking.
Fork of BeautifulMemeProject by
PsiSwarm/sensors.h@3:cd048f6e544e, 2015-10-05 (annotated)
- Committer:
- jah128
- Date:
- Mon Oct 05 20:42:37 2015 +0000
- Revision:
- 3:cd048f6e544e
- Parent:
- 0:8a5497a2e366
- Child:
- 6:ff3c66f7372b
Added crude line following code
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 | 0:8a5497a2e366 | 5 | * (C) Dr James Hilder, Dept. Electronics & Computer Science, University of York |
jah128 | 0:8a5497a2e366 | 6 | * |
jah128 | 0:8a5497a2e366 | 7 | * PsiSwarm Library Version: 0.2 |
jah128 | 0:8a5497a2e366 | 8 | * |
jah128 | 0:8a5497a2e366 | 9 | * September 2015 |
jah128 | 0:8a5497a2e366 | 10 | * |
jah128 | 0:8a5497a2e366 | 11 | */ |
jah128 | 0:8a5497a2e366 | 12 | |
jah128 | 0:8a5497a2e366 | 13 | #ifndef SENSORS_H |
jah128 | 0:8a5497a2e366 | 14 | #define SENSORS_H |
jah128 | 0:8a5497a2e366 | 15 | |
jah128 | 0:8a5497a2e366 | 16 | float get_battery_voltage ( void ); |
jah128 | 0:8a5497a2e366 | 17 | float get_current ( void ); |
jah128 | 0:8a5497a2e366 | 18 | float get_dc_voltage ( void ); |
jah128 | 0:8a5497a2e366 | 19 | |
jah128 | 0:8a5497a2e366 | 20 | float get_temperature ( void ); |
jah128 | 0:8a5497a2e366 | 21 | void enable_ultrasonic_ticker( void ); |
jah128 | 0:8a5497a2e366 | 22 | void disable_ultrasonic_ticker( void ); |
jah128 | 0:8a5497a2e366 | 23 | void update_ultrasonic_measure ( void ); |
jah128 | 0:8a5497a2e366 | 24 | void IF_read_ultrasonic_measure ( void ); |
jah128 | 0:8a5497a2e366 | 25 | float read_reflected_ir_distance ( char index ); |
jah128 | 0:8a5497a2e366 | 26 | float get_reflected_ir_distance ( char index ); |
jah128 | 0:8a5497a2e366 | 27 | unsigned short get_background_raw_ir_value ( char index ); |
jah128 | 0:8a5497a2e366 | 28 | unsigned short get_illuminated_raw_ir_value ( char index ); |
jah128 | 0:8a5497a2e366 | 29 | void store_reflected_ir_distances ( void ); |
jah128 | 0:8a5497a2e366 | 30 | void store_background_raw_ir_values ( void ); |
jah128 | 0:8a5497a2e366 | 31 | void store_illuminated_raw_ir_values ( void ); |
jah128 | 0:8a5497a2e366 | 32 | float calculate_reflected_distance ( unsigned short background_value, unsigned short illuminated_value ); |
jah128 | 0:8a5497a2e366 | 33 | unsigned short read_illuminated_raw_ir_value ( char index ) ; |
jah128 | 0:8a5497a2e366 | 34 | |
jah128 | 0:8a5497a2e366 | 35 | unsigned short get_background_base_ir_value ( char index ); |
jah128 | 0:8a5497a2e366 | 36 | unsigned short get_illuminated_base_ir_value ( char index ); |
jah128 | 0:8a5497a2e366 | 37 | void store_ir_values ( void ); |
jah128 | 0:8a5497a2e366 | 38 | void store_base_ir_values ( void ); |
jah128 | 0:8a5497a2e366 | 39 | void store_background_base_ir_values ( void ); |
jah128 | 0:8a5497a2e366 | 40 | void store_illuminated_base_ir_values ( void ); |
jah128 | 0:8a5497a2e366 | 41 | |
jah128 | 3:cd048f6e544e | 42 | void store_line_position ( void ); |
jah128 | 0:8a5497a2e366 | 43 | void calibrate_base_ir_sensors ( void ); |
jah128 | 0:8a5497a2e366 | 44 | |
jah128 | 0:8a5497a2e366 | 45 | #endif |