openroberta-lab icon indicating copy to clipboard operation
openroberta-lab copied to clipboard

MicrobitV2 get LED brightness returns wrong values

Open heini208 opened this issue 1 year ago • 0 comments

Describe the bug

  • The get LED brightness block does not return values ranging from 0-9.
  • Instead it returns doubling values till 256 (0,1,2,4,8,16,32,64,128,256)
  • This bug is not reproducible in the python editor by microbit. This most likely means that this issue would get resolved by updating the firmware hex used to generate the hex file in the lab.

To Reproduce Steps to reproduce the behavior:

  1. Go to microbit v2
  2. Go to the expert toolbox
  3. Set the LED brightness to a value greater than 2
  4. Read the LED brightness via the display or serial
  5. See Error

Expected behavior

  • The get LED brightness block should return values from 0-9 that match the value set in the set LED brightness block.

Screenshots Example program showing the blocks affected: image

Additional context

  • This should also be tested on the original microbit.

heini208 avatar May 10 '23 09:05 heini208