cy liang
/
blip_rainbow_mbed-os
blip_rainbow for Mbed OS 5.x
Diff: main.cpp
- Revision:
- 4:ad1c22b1de40
- Parent:
- 3:2d84c8262139
--- 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);