C++ Library for the PsiSwarm Robot - Version 0.8
Dependents: PsiSwarm_V8_Blank_CPP Autonomia_RndmWlk
Fork of PsiSwarmV7_CPP by
colour.h
00001 /* University of York Robotics Laboratory PsiSwarm Library: Colour Sensors Header File 00002 * 00003 * Copyright 2016 University of York 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 00007 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS 00008 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00009 * See the License for the specific language governing permissions and limitations under the License. 00010 * 00011 * File: colour.h 00012 * 00013 * (C) Dept. Electronics & Computer Science, University of York 00014 * James Hilder, Alan Millard, Alexander Horsfield, Homero Elizondo, Jon Timmis 00015 * 00016 * PsiSwarm Library Version: 0.8 00017 * 00018 * October 2016 00019 * 00020 * 00021 */ 00022 00023 00024 #ifndef COLOUR_H 00025 #define COLOUR_H 00026 00027 /** 00028 * The Colour class contains the functions for reading the base-mounted and top-mounted I2C colour sensors (optional). 00029 */ 00030 class Colour 00031 { 00032 public: 00033 /** Set the gain of the base colour sensor 00034 * 00035 * @param gain The gain value for the sensor 00036 */ 00037 void set_base_colour_sensor_gain(char gain); 00038 00039 /** Set the integration time constant for the base colour sensor 00040 * 00041 * @param gain The gain value for the sensor 00042 */ 00043 void set_base_colour_sensor_integration_time(char int_time); 00044 00045 /** Enable the base colour sensor 00046 */ 00047 void enable_base_colour_sensor(void); 00048 00049 /** Read the values from the base colour sensor 00050 * 00051 * @param Pointer to 3 x int array for r-g-b values 00052 */ 00053 void read_base_colour_sensor_values(int * store_array); 00054 char IF_check_base_colour_sensor(void); 00055 00056 }; 00057 #endif
Generated on Tue Jul 12 2022 21:11:24 by 1.7.2