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@2:cf208b7bb73e, 2017-04-27 (annotated)
- Committer:
- utsal
- Date:
- Thu Apr 27 16:45:22 2017 +0000
- Revision:
- 2:cf208b7bb73e
- Parent:
- 0:00e98c624c5f
Final version of 'PV cells on exposure to cosmic radiation'
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
utsal | 0:00e98c624c5f | 1 | #include "ISL29125.h" |
utsal | 0:00e98c624c5f | 2 | #include "RGB_Sensor.h" |
utsal | 0:00e98c624c5f | 3 | |
utsal | 0:00e98c624c5f | 4 | |
utsal | 0:00e98c624c5f | 5 | //RGB Sensor 1 is connected to p9 and p10 |
utsal | 0:00e98c624c5f | 6 | ISL29125 RGB_sensor1(p9, p10); |
utsal | 0:00e98c624c5f | 7 | |
utsal | 0:00e98c624c5f | 8 | //RGB Sensor 2 is connected to p28 and p27 |
utsal | 0:00e98c624c5f | 9 | ISL29125 RGB_sensor2(p28, p27); |
utsal | 0:00e98c624c5f | 10 | |
utsal | 0:00e98c624c5f | 11 | void RGB_init(){ |
utsal | 0:00e98c624c5f | 12 | RGB_sensor1.RGBmode(ISL29125_RGB); |
utsal | 0:00e98c624c5f | 13 | RGB_sensor1.Range(ISL29125_10KLX); |
utsal | 0:00e98c624c5f | 14 | RGB_sensor1.Resolution(ISL29125_16BIT); |
utsal | 0:00e98c624c5f | 15 | |
utsal | 0:00e98c624c5f | 16 | RGB_sensor2.RGBmode(ISL29125_RGB); |
utsal | 0:00e98c624c5f | 17 | RGB_sensor2.Range(ISL29125_10KLX); |
utsal | 0:00e98c624c5f | 18 | RGB_sensor2.Resolution(ISL29125_16BIT); |
utsal | 0:00e98c624c5f | 19 | } |
utsal | 0:00e98c624c5f | 20 | void get_rgb1(uint16_t rgb1[]){ |
utsal | 0:00e98c624c5f | 21 | RGB_sensor1.Read(ISL29125_RGB, rgb1); |
utsal | 0:00e98c624c5f | 22 | } |
utsal | 0:00e98c624c5f | 23 | void get_rgb2(uint16_t rgb2[]){ |
utsal | 0:00e98c624c5f | 24 | RGB_sensor2.Read(ISL29125_RGB, rgb2); |
utsal | 0:00e98c624c5f | 25 | } |
utsal | 0:00e98c624c5f | 26 | |
utsal | 0:00e98c624c5f | 27 | |
utsal | 0:00e98c624c5f | 28 | |
utsal | 0:00e98c624c5f | 29 | //PinName i2c_SDA = p9; |
utsal | 0:00e98c624c5f | 30 | //PinName i2c_SCL = p10; |