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: BSP_DISCO_F746NG_patch_fixed LCD_DISCO_F746NG TS_DISCO_F746NG FATFileSystem TinyJpgDec_interwork mbed-src
Diff: main.cpp
- Revision:
- 0:995ae8b9afc8
- Child:
- 1:35e2ad5cd1fe
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Oct 29 02:30:51 2015 +0000
@@ -0,0 +1,31 @@
+#include "mbed.h"
+#include "TS_DISCO_F746NG.h"
+#include "LCD_DISCO_F746NG.h"
+
+LCD_DISCO_F746NG lcd;
+TS_DISCO_F746NG ts;
+
+DigitalOut led1(LED1);
+Ticker toggle_led_ticker;
+
+void toggle_led()
+{
+ led1 = !led1;
+}
+
+int main()
+{
+ char buffer[100];
+ int counter=0;
+ led1 = 1;
+
+ toggle_led_ticker.attach(&toggle_led, 0.2);
+ while(1)
+ {
+ wait(0.2);
+
+ snprintf(buffer,sizeof(buffer),"%u",counter);
+ counter++;
+ lcd.DisplayStringAt(0, LINE(1), (uint8_t *)buffer, CENTER_MODE);
+ }
+}