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: mbed
Diff: main.cpp
- Revision:
- 0:1d3ca434d486
- Child:
- 1:799a74dde023
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Jun 19 13:29:00 2014 +0000
@@ -0,0 +1,18 @@
+#include "mbed.h"
+
+DigitalOut r(PTC2);
+DigitalOut g(PTC1);
+AnalogIn ldr(A3);
+
+int main(){
+ while(1){
+ if(ldr>0.50){
+ g=1;
+ r=0;
+ }
+ else if(ldr<0.50){
+ g=0;
+ r=1;
+ }
+ }
+}
\ No newline at end of file