[Microbit-Python] Can the micro:bit display text on the Adafruit OLED display?

Mark Shannon mark at hotpy.org
Thu Nov 17 04:57:16 EST 2016


Hi Nevil,

The simplest thing to do is to write code that mirrors the micro:bit 
display onto the external display:

def update_external_display():
     for x in range(5):
         for y in range(5)
             external_display.set_pixel(x, y, display.get_pixel(x, y))

Then use the normal display code.

Or, you can get the font data by creating an Image from a character:

 >>> Image("%")
Image('99009:90090:00900:09009:90099:')

Cheers,
Mark.

On 16/11/16 09:04, Nevil Hunt wrote:
> Hi,
>
>
> Thanks to help from Phillip at Adafruit I have the Adafruit 128x32 I2C
> OLED display (www.adafruit.com/product/931
> <http://www.adafruit.com/product/931>) working with the micro:bit using
> their Micro Python
> driver (https://github.com/adafruit?query=micropython) see attached
> photo. However I am limited to just generating patterns but I would like
> to generate text!
>
>
> Adafruit's view on this is that generating text could be difficult
>
>     a) because there is limited available RAM on the micro:bit, and
>
>     b) because they don't have access to the micro:bit's internal font.
>
>
> Does anyone have any thoughts on this?
>
> e.g. Can Python get access to the internal font?
>
> If so, how could this font be used to generate characters on the OLED
> display without running out of RAM?
>
>
>
> Cheers,
>
>
> Nevil
>
>
>
>
>
> _______________________________________________
> Microbit mailing list
> Microbit at python.org
> https://mail.python.org/mailman/listinfo/microbit
>


More information about the Microbit mailing list