Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of BeautifulMemeProject by
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, Homero Elizondo, Jon Timmis 00007 * 00008 * PsiSwarm Library Version: 0.3 00009 * 00010 * October 2015 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 00039 int get_bearing_from_ir_array ( unsigned short * ir_sensor_readings); 00040 void store_ir_values ( void ); 00041 void store_base_ir_values ( void ); 00042 void store_background_base_ir_values ( void ); 00043 void store_illuminated_base_ir_values ( void ); 00044 00045 void store_line_position ( void ); 00046 void calibrate_base_ir_sensors ( void ); 00047 00048 #endif
Generated on Fri Jul 15 2022 08:26:10 by
1.7.2
