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

Need library framebuf #72

Closed crouse12 closed 3 years ago

crouse12 commented 3 years ago

ESP32 and Esp8266 have a library, called framebuf. Thus, they can show string or draw a picture on oled or Max7219. However, I found that microbit v2 does not have this library. Can you add it?

microbit-carlos commented 3 years ago

Hi @crouse12,

You can build a version of MicroPython with the framebuf module included. Hopefully this steps should be relatively easy:

Alternatively there is also this pure Python version available: https://github.com/adafruit/Adafruit_CircuitPython_framebuf

crouse12 commented 3 years ago

Could you tell me how to put this new version of micropython into pythoneditor? I need to generate hex file for microbit v2.

microbit-carlos commented 3 years ago

You can replace the microbit-micropython-v2.hex file in https://github.com/bbcmicrobit/PythonEditor/tree/master/micropython.

You can also send files to the micro:bit from your computer with https://github.com/ntoll/microfs.

microbit-carlos commented 3 years ago

I'll close this issue as resolved, but feel free to reopen if you have any questions in this area!