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.
Fork of Hexi_Blinky_Example by
Revision 14:defc334658db, committed 2016-08-15
- Comitter:
- GregC
- Date:
- Mon Aug 15 03:36:56 2016 +0000
- Parent:
- 13:e702b6efb480
- Commit message:
- Hexiwear GPIO program example
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r e702b6efb480 -r defc334658db main.cpp
--- a/main.cpp Fri Aug 12 18:36:42 2016 +0000
+++ b/main.cpp Mon Aug 15 03:36:56 2016 +0000
@@ -1,12 +1,13 @@
#include "mbed.h"
-DigitalOut myled(LED1);
+DigitalOut gpo(PTB13);
+DigitalOut led(LED_GREEN);
-int main() {
- while(1) {
- myled = 1;
- wait(0.2);
- myled = 0;
- wait(0.2);
+int main()
+{
+ while (true) {
+ gpo = !gpo; // toggle pin
+ led = !led; // toggle led
+ wait(0.2f);
}
-}
+}
\ No newline at end of file
