Mbot: Led block does not operate correctly:


#1

The following functions in Mbot do not operate correctly:
set_led(led_on_board, all, red, green, blue)
set_led_strip(Port, Slot, all, red, green, blue)

After several test, it seems colors are displaced:
Parameter led_on_board: operates ok.
Parameter all: its value is transferred as “red” value (as it only has 0-4 values, red is very light)
Parameter red: its value is transferred as “green” value.
Parameter green: its value is transferred as “blue” value.

It shoud be easy to fix for someone who knows how to do it … If someone knows how to, please explain …

Thanks,


#2

Hi,

I’m assuming that you are using mBlock 3.2.2 (the most current version).

If you do not have the LED strip, you can’t use the Set LED Strip block.

With regard to the set led, unless you have additional LEDs plugged into the ports marked 1-4, you should leave the first parameter as “led on board” because you will be using the LEDs that are on the mCore board.

The second parameter controls which LED is lit (all, 1, 2, 3, 4). For the mBot, your choices are all, 1, or 2.

While the drop down lists for the red, green, and blue parameters list 0, 20, 60, 150, 255, you can type in any number between 0 - 255.

Hope this helps!

Chuck


#3

" it seems colors are displaced:" because you have not“ Upgrade Firmware ”before.


#4

Perfect, once the firmware is updated it works fine.

Thank you!


#5

Always a good practice to upgrade the firmware when updating the version of mBlock. Glad to hear you’re up and running. :slightly_smiling: