Final program for the test of the RGB sensor
Dependencies: ISL29125 SDFileSystem mbed
RGBSensor.cpp@1:e0fc716e2394, 2016-03-12 (annotated)
- Committer:
- Jeriah
- Date:
- Sat Mar 12 00:01:03 2016 +0000
- Revision:
- 1:e0fc716e2394
- Parent:
- 0:547856de255b
Final edition of RGB_test program
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 | } |