![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Final program for the test of the RGB sensor
Dependencies: ISL29125 SDFileSystem mbed
RGBSensor.cpp@4:08069730374b, 2016-03-17 (annotated)
- Committer:
- Jeriah
- Date:
- Thu Mar 17 18:41:44 2016 +0000
- Revision:
- 4:08069730374b
- Parent:
- 1:e0fc716e2394
Error fixed, I didn't have a reading for blue
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Jeriah | 0:547856de255b | 1 | #include "RGBSensor.h" |
Jeriah | 0:547856de255b | 2 | #include "ISL29125.h" |
Jeriah | 0:547856de255b | 3 | |
Jeriah | 0:547856de255b | 4 | // The location of the sensor on the FRDM-K64F// |
Jeriah | 0:547856de255b | 5 | |
Jeriah | 0:547856de255b | 6 | ISL29125 RGB_sensor(I2C_SDA,I2C_SCL); |
Jeriah | 0:547856de255b | 7 | |
Jeriah | 0:547856de255b | 8 | void RGB_init() { |
Jeriah | 0:547856de255b | 9 | RGB_sensor.RGBmode(ISL29125_RGB); |
Jeriah | 0:547856de255b | 10 | RGB_sensor.Range(ISL29125_10KLX); |
Jeriah | 0:547856de255b | 11 | RGB_sensor.Resolution(ISL29125_16BIT); |
Jeriah | 0:547856de255b | 12 | } |
Jeriah | 0:547856de255b | 13 | void get_rgb(uint16_t rgb[]){ |
Jeriah | 1:e0fc716e2394 | 14 | RGB_sensor.Read(ISL29125_RGB, rgb); |
Jeriah | 0:547856de255b | 15 | } |