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.
Revision 0:2e74c6cefef0, committed 2019-02-23
- Comitter:
- dushyantkumarsingh83
- Date:
- Sat Feb 23 19:55:15 2019 +0000
- Commit message:
- Binary Counter
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Sat Feb 23 19:55:15 2019 +0000
@@ -0,0 +1,15 @@
+#include "mbed.h"
+//#include "BusOut.h"
+BusOut myleds(LED1,LED2,LED3,LED4); //defining four leds on board as output bus
+
+int main()
+{
+ unsigned char i; // defining i as character variable
+ while(1) {
+ for(i=0; i<=15; i++) { // for loop to count from 0 - 15 having 4 - counter
+ //myleds=i; // assigning the counted value to leds on the board
+ myleds.write(i); // assigning the counted value to leds on the board using write function
+ wait(0.5); // delay to hold led for some time in on/off condition
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat Feb 23 19:55:15 2019 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/a9913a65894f \ No newline at end of file