blip_rainbow for Mbed OS 5.x

Dependencies:   PixelArray

Files at this revision

API Documentation at this revision

Comitter:
cyliang
Date:
Thu Feb 06 07:10:24 2020 +0000
Parent:
3:2d84c8262139
Commit message:
Port blip_rainbow to Mbed OS 5 and support M487 platform

Changed in this revision

PixelArray.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-os.lib Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show diff for this revision Revisions of this file
mbed_app.json Show annotated file Show diff for this revision Revisions of this file
--- a/PixelArray.lib	Thu Nov 26 09:28:37 2015 +0000
+++ b/PixelArray.lib	Thu Feb 06 07:10:24 2020 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/JacobBramley/code/PixelArray/#47802e75974e
+https://os.mbed.com/users/cyliang/code/PixelArray/#70078bd3264f
--- a/main.cpp	Thu Nov 26 09:28:37 2015 +0000
+++ b/main.cpp	Thu Feb 06 07:10:24 2020 +0000
@@ -4,7 +4,11 @@
 #include "neopixel.h"
 
 // Matrix led output pin
-#define DATA_PIN P0_9
+#if defined(TARGET_NUMAKER_IOT_M487)
+#define DATA_PIN PA_8
+#else
+#define DATA_PIN D9
+#endif
 
 void generate(neopixel::Pixel * out, uint32_t index, uintptr_t extra)
 {
@@ -17,11 +21,12 @@
 int main()
 {
     // Turn off miniblip buzzer
-    PwmOut speaker(P0_8);
+    PwmOut speaker(D2);
     speaker=0.0;
     // Create a temporary DigitalIn so we can configure the pull-down resistor.
     DigitalIn(DATA_PIN, PullDown);
 
+    printf("Start LED pixel-array demo...\r\n");
     // The pixel array control class.
     neopixel::PixelArray array(DATA_PIN);
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-os.lib	Thu Feb 06 07:10:24 2020 +0000
@@ -0,0 +1,1 @@
+https://github.com/ARMmbed/mbed-os/#b6e5a0a8afa34dec9dae8963778aebce0c82a54b
--- a/mbed.bld	Thu Nov 26 09:28:37 2015 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/04dd9b1680ae
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed_app.json	Thu Feb 06 07:10:24 2020 +0000
@@ -0,0 +1,9 @@
+{
+    "target_overrides": {
+        "*": {
+            "platform.stdio-baud-rate"              : 115200,
+            "platform.stdio-convert-newlines"       : true,
+            "platform.heap-stats-enabled"           : 1
+        }
+    }
+}