Final program for the test of the RGB sensor

Dependencies:   ISL29125 SDFileSystem mbed

Files at this revision

API Documentation at this revision

Comitter:
Jeriah
Date:
Thu Mar 17 18:41:44 2016 +0000
Parent:
3:8ace1992bc93
Commit message:
Error fixed, I didn't have a reading for blue

Changed in this revision

RGBSensor.h Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/RGBSensor.h	Sat Mar 12 01:42:13 2016 +0000
+++ b/RGBSensor.h	Thu Mar 17 18:41:44 2016 +0000
@@ -1,7 +1,7 @@
 #include "mbed.h"
 
-#ifndef RGBSensor   
-#define RGBSensor
+#ifndef RGBSensor_H   
+#define RGBSensor_H
 
 
 void RGB_init();
--- a/main.cpp	Sat Mar 12 01:42:13 2016 +0000
+++ b/main.cpp	Thu Mar 17 18:41:44 2016 +0000
@@ -30,7 +30,7 @@
         if (t.read()>(lastTime+interval))  {
           lastTime=t.read();
           get_rgb(rgb);
-          pc.printf("t = %.2f \t red = %d \t green = %d\t blue = %d\r\n",lastTime,rgb[0],rgb[1]);
+          pc.printf("t = %.2f \t red = %d \t green = %d\t blue = %d\r\n",lastTime,rgb[0],rgb[1],rgb[2]);
           writeData_testRGB(lastTime,rgb[0],rgb[1],rgb[2]);//send data to writeData in SDsave.cpp
           //we will get all rgb readings through an array, with the corresponding integers going in order red, green, blue
         }