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.
Diff: main.cpp
- Revision:
- 0:e0cbece9fd4f
diff -r 000000000000 -r e0cbece9fd4f main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Sun Jul 13 15:50:54 2014 +0000
@@ -0,0 +1,34 @@
+#include "mbed.h"
+
+DigitalOut myledB(P0_0); //lpc810 dp8
+DigitalOut myledG(P0_1); //lpc810 dp5
+
+int main(){
+ while(1){
+
+ for( int i = 1,j=20;i<20; i++,j--){
+ for(int k = 1;k<20;k++){
+ myledB = 1;
+ myledG = 0; // LED No , Red , Green , Blue
+ wait_ms(i);
+ myledB = 0;
+ myledG = 1;
+ wait_ms(j);
+ }
+ }
+
+
+ for(int i = 20,j =0; i > 1 ; i--, j++){
+ for(int k = 1;k<20;k++){
+ myledB = 1;
+ myledG = 0; // LED No , Red , Green , Blue
+ wait_ms(i);
+ myledB = 0;
+ myledG = 1;
+ wait_ms(j);
+ }
+ }
+
+ }
+}
+