UKESF Headstart Summer School / PsiSwarm-Headstart

Dependents:   UKESF_Lab

Fork of PsiSwarmLibrary by James Hilder

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers sensors.h Source File

sensors.h

00001 /* University of York Robotics Laboratory PsiSwarm Library: Sensor Functions Header File
00002  * 
00003  * File: sensors.h
00004  *
00005  * (C) Dept. Electronics & Computer Science, University of York
00006  * James Hilder, Alan Millard, Alexander Horsfield, Homero Elizondo, Jon Timmis
00007  *
00008  * PsiSwarm Library Version: 0.41
00009  *
00010  * March 2016
00011  *
00012  */
00013  
00014 #ifndef SENSORS_H
00015 #define SENSORS_H
00016 
00017 float get_battery_voltage ( void );
00018 float get_current ( void );
00019 float get_dc_voltage ( void );
00020 
00021 float get_temperature ( void );
00022 void enable_ultrasonic_ticker( void );
00023 void disable_ultrasonic_ticker( void );
00024 void update_ultrasonic_measure ( void );
00025 void IF_read_ultrasonic_measure ( void );
00026 float read_reflected_ir_distance ( char index );
00027 float get_reflected_ir_distance ( char index );
00028 unsigned short get_background_raw_ir_value ( char index );
00029 unsigned short get_illuminated_raw_ir_value ( char index );
00030 void store_reflected_ir_distances ( void );
00031 void store_background_raw_ir_values ( void );
00032 void store_illuminated_raw_ir_values ( void );
00033 float calculate_reflected_distance ( unsigned short background_value, unsigned short illuminated_value );
00034 unsigned short read_illuminated_raw_ir_value ( char index ) ;
00035  
00036 unsigned short get_background_base_ir_value ( char index );
00037 unsigned short get_illuminated_base_ir_value ( char index );
00038 unsigned short calculate_base_ir_value ( char index );
00039 unsigned short calculate_side_ir_value ( char index );
00040 
00041 int get_bearing_from_ir_array ( unsigned short * ir_sensor_readings);
00042 void store_ir_values ( void );
00043 void store_base_ir_values ( void );
00044 void store_background_base_ir_values ( void );
00045 void store_illuminated_base_ir_values ( void );
00046 
00047 void store_line_position ( void );
00048 void calibrate_base_ir_sensors ( void );
00049 
00050 #endif