shared version

Dependencies:   ExtendedTimer ISL29125 SDFileSystem mbed

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

Revision:
0:00e98c624c5f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RGB_Sensor.cpp	Tue Apr 18 17:47:39 2017 +0000
@@ -0,0 +1,30 @@
+#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;
\ No newline at end of file