Psi Swarm robot library version 0.9

Dependents:   PsiSwarm_V9_Blank

Fork of PsiSwarmV9 by James Hilder

Committer:
jah128
Date:
Tue May 30 21:03:18 2017 +0000
Revision:
14:2f1ad77d281e
Parent:
13:adbd827234a4
Child:
15:66be5ec52c3b
Initial version (fork of version 0.8)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jah128 0:d6269d17c8cf 1 /* University of York Robotics Laboratory PsiSwarm Library: Colour Sensors Header File
jah128 13:adbd827234a4 2 *
jah128 14:2f1ad77d281e 3 * Copyright 2017 University of York
jah128 6:b340a527add9 4 *
jah128 13:adbd827234a4 5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
jah128 6:b340a527add9 6 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
jah128 6:b340a527add9 7 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS
jah128 13:adbd827234a4 8 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
jah128 6:b340a527add9 9 * See the License for the specific language governing permissions and limitations under the License.
jah128 6:b340a527add9 10 *
jah128 0:d6269d17c8cf 11 * File: colour.h
jah128 0:d6269d17c8cf 12 *
jah128 0:d6269d17c8cf 13 * (C) Dept. Electronics & Computer Science, University of York
jah128 0:d6269d17c8cf 14 * James Hilder, Alan Millard, Alexander Horsfield, Homero Elizondo, Jon Timmis
jah128 0:d6269d17c8cf 15 *
jah128 14:2f1ad77d281e 16 * PsiSwarm Library Version: 0.9
jah128 0:d6269d17c8cf 17 *
jah128 14:2f1ad77d281e 18 * June 2017
jah128 0:d6269d17c8cf 19 *
jah128 0:d6269d17c8cf 20 *
jah128 13:adbd827234a4 21 */
jah128 0:d6269d17c8cf 22
jah128 0:d6269d17c8cf 23
jah128 0:d6269d17c8cf 24 #ifndef COLOUR_H
jah128 0:d6269d17c8cf 25 #define COLOUR_H
jah128 0:d6269d17c8cf 26
jah128 13:adbd827234a4 27 /**
jah128 13:adbd827234a4 28 * The Colour class contains the functions for reading the base-mounted and top-mounted I2C colour sensors (optional).
jah128 7:aa5a4a257895 29 */
jah128 13:adbd827234a4 30 class Colour
jah128 13:adbd827234a4 31 {
jah128 13:adbd827234a4 32 public:
jah128 13:adbd827234a4 33 /** Set the gain of the base colour sensor
jah128 13:adbd827234a4 34 *
jah128 13:adbd827234a4 35 * @param gain The gain value for the sensor
jah128 13:adbd827234a4 36 */
jah128 13:adbd827234a4 37 void set_base_colour_sensor_gain(char gain);
jah128 7:aa5a4a257895 38
jah128 13:adbd827234a4 39 /** Set the integration time constant for the base colour sensor
jah128 13:adbd827234a4 40 *
jah128 13:adbd827234a4 41 * @param gain The gain value for the sensor
jah128 13:adbd827234a4 42 */
jah128 13:adbd827234a4 43 void set_base_colour_sensor_integration_time(char int_time);
jah128 13:adbd827234a4 44
jah128 13:adbd827234a4 45 /** Enable the base colour sensor
jah128 13:adbd827234a4 46 */
jah128 13:adbd827234a4 47 void enable_base_colour_sensor(void);
jah128 0:d6269d17c8cf 48
jah128 13:adbd827234a4 49 /** Read the values from the base colour sensor
jah128 13:adbd827234a4 50 *
jah128 13:adbd827234a4 51 * @param Pointer to 3 x int array for r-g-b values
jah128 13:adbd827234a4 52 */
jah128 13:adbd827234a4 53 void read_base_colour_sensor_values(int * store_array);
jah128 13:adbd827234a4 54 char IF_check_base_colour_sensor(void);
jah128 0:d6269d17c8cf 55
jah128 13:adbd827234a4 56 };
jah128 0:d6269d17c8cf 57 #endif