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:6d3f02284d31
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Fri May 08 17:00:04 2015 +0000
@@ -0,0 +1,22 @@
+#include "mbed.h"
+DigitalOut redled(p5);
+DigitalOut greenled(p6);
+DigitalIn sw1(p7);
+int x;
+int main() {
+sw1.mode(PullUp); // Pull up internal resistor
+ while(x<10) {
+ greenled = 0; //green led is off
+ redled = 0; // flash red led
+ if (sw1==0) {
+ if (sw1==1) {
+ x++;
+ wait(0.1);
+ }
+
+ }
+
+}
+greenled = 1; //green led is off
+redled = 1; // flash red led
+}