microbit-foundation / micropython-microbit-v2

Temporary home for MicroPython for micro:bit v2 as we stablise it before pushing upstream
MIT License
42 stars 23 forks source link

get_pixel() returns different value on V2 #75

Closed microbit-mark closed 3 years ago

microbit-mark commented 3 years ago

The documentation for display.get_pixel(x,y) https://microbit-micropython.readthedocs.io/en/v2-docs/display.html#microbit.display.get_pixel states that the LED will return a value between 0-9

On V2 MicroPython this appears to return 255 for a fully bright LED

To replicate

  1. Go https://python.microbit.org/v/2 and flash MicroPython
  2. Enter REPL
>>> from microbit import *
>>> display.clear()
>>> display.set_pixel(2, 2, 9)
>>> display.get_pixel(2,2)

V1 returns 9

V2 returns 255