shared version

Dependencies:   ExtendedTimer ISL29125 SDFileSystem mbed

Link to the experiment wiki: http://www.whitworthnearspace.org/wiki/Dependence_of_photovoltaic_performance_on_light_spectrum

RGB_Sensor.cpp

Committer:
utsal
Date:
2017-04-27
Revision:
2:cf208b7bb73e
Parent:
0:00e98c624c5f

File content as of revision 2:cf208b7bb73e:

#include "ISL29125.h"
#include "RGB_Sensor.h"


//RGB Sensor 1 is connected to p9 and p10
ISL29125 RGB_sensor1(p9, p10);

//RGB Sensor 2 is connected to p28 and p27
ISL29125 RGB_sensor2(p28, p27);

void RGB_init(){
    RGB_sensor1.RGBmode(ISL29125_RGB);
    RGB_sensor1.Range(ISL29125_10KLX);
    RGB_sensor1.Resolution(ISL29125_16BIT);
    
    RGB_sensor2.RGBmode(ISL29125_RGB);
    RGB_sensor2.Range(ISL29125_10KLX);
    RGB_sensor2.Resolution(ISL29125_16BIT);
}
void get_rgb1(uint16_t rgb1[]){
    RGB_sensor1.Read(ISL29125_RGB, rgb1);
}
void get_rgb2(uint16_t rgb2[]){
    RGB_sensor2.Read(ISL29125_RGB, rgb2);
}   



//PinName i2c_SDA = p9;
//PinName i2c_SCL = p10;