TYBLE16 will become mbed chip! You can compile as a BBC micro:bit on the mbed (not mbed-os5).

Dependencies:   TextLCD mbed

Please see follows.
/users/kenjiArai/notebook/tyble16-module-will-become-a-mbed-family--mbedliza/#

Files at this revision

API Documentation at this revision

Comitter:
kenjiArai
Date:
Sun Oct 29 03:46:59 2017 +0000
Commit message:
TYBLE16 will become mbed chip! You can compile as a BBC micro:bit on the mbed (not mbed-os5).

Changed in this revision

TextLCD.lib Show annotated file Show diff for this revision Revisions of this file
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
diff -r 000000000000 -r 64039a43c2e1 TextLCD.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TextLCD.lib	Sun Oct 29 03:46:59 2017 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/wim/code/TextLCD/#111ca62e8a59
diff -r 000000000000 -r 64039a43c2e1 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Oct 29 03:46:59 2017 +0000
@@ -0,0 +1,59 @@
+/*
+ * Mbed Application program / Using Akizuki BLE Module AE-TYBLE16
+ *      on-board module : TAIYO YUDEN BLE 4.2 TYSA-B (EYSGJNAWY-WX)
+ *
+ *  http://akizukidenshi.com/catalog/g/gK-12339/
+ *
+ * Copyright (c) 2017 Kenji Arai / JH1PJL
+ *  http://www.page.sannet.ne.jp/kenjia/index.html
+ *  http://mbed.org/users/kenjiArai/
+ *      Created:    October   29th, 2017
+ *      Revised:    October   29th, 2017
+ */
+
+//  Include --------------------------------------------------------------------
+#include "mbed.h"
+#include "TextLCD.h"
+
+//  Definition -----------------------------------------------------------------
+
+//  Object/ Constructor --------------------------------------------------------
+Serial      pc(P0_1, P0_3);
+DigitalOut  led(P0_5);
+I2C         i2c(P0_0, P0_2);
+TextLCD_I2C_N   lcd(&i2c, 0x7c, TextLCD::LCD16x2);  // LCD(Akizuki  AQM1602A)
+
+//  RAM ------------------------------------------------------------------------
+
+//  ROM / Constant data --------------------------------------------------------
+
+//  Function prototypes --------------------------------------------------------
+
+//------------------------------------------------------------------------------
+//  Control Program
+//------------------------------------------------------------------------------
+int main()
+{                    // 1234567890123456
+    char lcd_buf[20] = "by K.Arai/JH1PJL";
+    uint32_t n = 0;
+
+    pc.printf("\r\n\r\nApplication for AE-TYBLE16 Module\r\n");
+    pc.printf("  created on %s %s (UTC)\r\n", __DATE__, __TIME__);
+    // lcd
+    lcd.locate(0, 0);       // 1st line top
+    lcd.puts("1234567890123456");
+    lcd.locate(0, 1);       // 2nd line top
+    lcd.printf("%s", lcd_buf);
+    lcd.setCursor(TextLCD_Base::CurOff_BlkOff);
+    lcd.setContrast(0x1b);  // for AE-AQM1602A
+    wait(5.0f);
+    while (true){
+        sprintf(lcd_buf, "passed %5d sec", n++);
+        pc.printf(" %sonds\r\n", lcd_buf);
+        lcd.locate(0, 0);   // 1st line
+        lcd.printf("%s", lcd_buf);
+        led = !led;
+        wait(1.0f);
+    }
+}
+
diff -r 000000000000 -r 64039a43c2e1 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun Oct 29 03:46:59 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/fb8e0ae1cceb
\ No newline at end of file