Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: Motor TCS3472_I2C mbed
Revision 0:c16de5d05dd7, committed 2015-04-26
- Comitter:
- ThatsAKnife
- Date:
- Sun Apr 26 19:09:55 2015 +0000
- Child:
- 1:789224bfa1e4
- Commit message:
- preliminary changes
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Motor.lib Sun Apr 26 19:09:55 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/simon/code/Motor/#f265e441bcd9
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TCS3472_I2C.lib Sun Apr 26 19:09:55 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/karlmaxwell67/code/TCS3472_I2C/#6d5bb4ad7d6e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/control.cpp Sun Apr 26 19:09:55 2015 +0000
@@ -0,0 +1,38 @@
+#include "mbed.h"
+#include "Motor.h"
+#include "TCS3472_I2C.h"
+
+PwmOut brightness(p22);
+TCS3472_I2C rgb(p28, p27);
+Timer time;
+int running=1;
+
+int rgb_data[4];
+float set_brightness = 1.0;
+
+int main(){
+ rgb.enablePowerAndRGBC();
+ rgb.setIntegrationTime(100);
+ brightness=set_brightness;
+ time.start();
+ //dc left fwd
+ //dc rght fwd
+ while(running=1){
+ if(rgb_data[1]>120 && rgb_data[2]<100){ //red;recalibrate
+ while(rgb_data[1]>100){ //recalibrate
+ //dc left rev
+ //dc rght fwd
+ time.reset();
+ //dc left fwd
+ //dc rght fwd
+ };
+ };
+ if(rgb_data[2]>100){ //green;recalibrate
+ while(rgb_data[2]>90){ //recalibrate
+ //dc left fwd
+ //dc rght rev
+ time.reset();
+ //dc left fwd
+ //dc rght fwd
+ };
+ };
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sun Apr 26 19:09:55 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/433970e64889 \ No newline at end of file