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: Hotboards_leds mbed
Revision 0:a0ed46c36cdc, committed 2016-02-29
- Comitter:
- RomanValenciaP
- Date:
- Mon Feb 29 20:03:19 2016 +0000
- Commit message:
- first release - requires approval
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Hotboards_leds.lib Mon Feb 29 20:03:19 2016 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/Hotboards/code/Hotboards_leds/#ea0715867677
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Mon Feb 29 20:03:19 2016 +0000
@@ -0,0 +1,30 @@
+
+/*
+ * This program blinks a led but this time we will show you
+ * how to use the write function to manipulate the led state
+ * according to a variable value
+ *
+ */
+
+#include "mbed.h"
+#include "Hotboards_leds.h"
+
+//bitRead macro taken from arduino
+#define bitRead( var, bit ) (((var) >> (bit)) & 0x01)
+
+Hotboards_leds led( PA_5 );
+
+uint8_t counter;
+
+int main()
+{
+ while(1)
+ {
+ //The led will blink because we are writing the LSB
+ //of the variable counter which on each iteration
+ //is incremented by 1.
+ led.write( bitRead( counter , 0 ) );
+ wait_ms( 200 );
+ counter ++;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Feb 29 20:03:19 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/252557024ec3 \ No newline at end of file