diff --git a/libs/core/basic.cpp b/libs/core/basic.cpp index 0eaea567..74cbdae5 100644 --- a/libs/core/basic.cpp +++ b/libs/core/basic.cpp @@ -13,7 +13,7 @@ namespace basic { //% weight=50 void setLedColor(int color) { if (!color) { - uBit.rgb.Off(); + uBit.rgb.off(); return; } @@ -22,9 +22,7 @@ namespace basic { int g = (color >> 8) & 0xFF; int b = (color) & 0xFF; - uBit.rgb.Set_Color(r,g,b,w); - uBit.rgb.On(); - uBit.rgb.Send_to_LED(); + uBit.rgb.setColour(r,g,b,w); } /** diff --git a/libs/core/dal.d.ts b/libs/core/dal.d.ts index 0e781f7b..905f189d 100644 --- a/libs/core/dal.d.ts +++ b/libs/core/dal.d.ts @@ -190,12 +190,6 @@ declare const enum DAL { MICROBIT_SERIAL_EVT_TX_EMPTY = 2, MICROBIT_UART_S_EVT_TX_EMPTY = 3, // built/yt/yotta_modules/microbit-dal/inc//drivers/CalliopeRGB.h - RGB_LED_DEFAULT_GREEN = 0, - RGB_LED_DEFAULT_RED = 0, - RGB_LED_DEFAULT_BLUE = 0, - RGB_LED_DEFAULT_WHITE = 0, - RGB_KEEP_VALUE = -1, - RGB_LED_MAX_INTENSITY = 50, // built/yt/yotta_modules/microbit-dal/inc//drivers/CalliopeSoundMotor.h CALLIOPE_SM_DEFAULT_DUTY_M = 50, CALLIOPE_SM_DEFAULT_DUTY_S = 100, diff --git a/libs/core/pxt.json b/libs/core/pxt.json index 359cb75c..395e146f 100644 --- a/libs/core/pxt.json +++ b/libs/core/pxt.json @@ -43,8 +43,7 @@ "microbit-dal": { "bluetooth": { "enabled": 0 - }, - "debug": 1 + } } } } diff --git a/libs/hello/hello.ts b/libs/hello/hello.ts index 9788ca83..1954fb0e 100644 --- a/libs/hello/hello.ts +++ b/libs/hello/hello.ts @@ -1,3 +1,12 @@ +basic.setLedColor(Colors.Blue) +basic.pause(500) +basic.setLedColor(Colors.Red) +basic.pause(500) +basic.setLedColor(Colors.Green) +basic.pause(500) +basic.setLedColor(0); +basic.setLedColor(Colors.Violet) +basic.pause(100) led.plot(0, 0) basic.pause(1000); basic.forever(() => {