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

Nevil Hunt nevil.hunt at hotmail.co.uk
Fri Nov 18 06:23:03 EST 2016


Hi Tony,


Thanks for the links to you tutorial - I hadn't spotted this one although I have seen some of your other Tutorials and Videos including the one on Micro Python where you demo'ed the micro:bit!


Yesterday, thanks to Mark's suggestion I got the OLED display working displaying text. At this stage only a single character but with a bit more time I'm sure I can make it display more!


The info about the FeatherWing display is just what I needed! I received one of these on Wednesday along with various other Adafruit Displays and Sensors and I have the CharlieWing Display almost ready to test (see attached photo). By the sound of it your new libraries may help me get the FeatherWing going as well as helping enhance my OLED display s/w, although it seems you have found I'm often running out of memory and it can take a while to work out how to make the code fit within both Flash & RAM . I'll give it a go over the next few days and let you know if I am successful!



Cheers,


Nevil


________________________________
From: Microbit <microbit-bounces+nevil.hunt=hotmail.co.uk at python.org> on behalf of Tony DiCola <tony at tonydicola.com>
Sent: 17 November 2016 20:40
To: For Pythonic MicroBit related discussions
Subject: Re: [Microbit-Python] Can the micro:bit display text on the Adafruit OLED display?

Check out this tutorial I recently did too:
https://learn.adafruit.com/micropython-displays-drawing-text  It uses
a little bitmap font library I made here:
https://github.com/adafruit/micropython-adafruit-bitmap-font  In

[https://avatars3.githubusercontent.com/u/181069?v=3&s=400]<https://github.com/adafruit/micropython-adafruit-bitmap-font>

adafruit/micropython-adafruit-bitmap-font<https://github.com/adafruit/micropython-adafruit-bitmap-font>
github.com
micropython-adafruit-bitmap-font - Text rendering module to write messages with simple bitmap fonts on any pixel-based display.



theory it should be able to work with any pixel-based display like the
microbit's LED matrix, an OLED, etc.  It works by having you plug in
the pixel drawing function to the module so it can call out to set all
the pixels when you draw text.  The font it includes is a simple 5
pixel wide by 8 pixel tall font we used in Adafruit's Arduino
libraries, so it works well for small low density displays like LED
grids, etc.  Should work reasonably well on a little OLED too.  The
code is all pure python so no need to build a new firmware, and if
microbit supports .mpy files you can copy those over and import and
use it without a big memory hit.  The font data is read from a file as
needed to reduce memory usage (otherwise it's a solid 1k+ of RAM you'd
need to load all the font data.. a bit too much).

On Thu, Nov 17, 2016 at 3:31 AM, Nicholas H.Tollervey <ntoll at ntoll.org> wrote:
> On 17/11/16 10:43, M.-A. Lemburg wrote:
>> Thanks for that little trick :-) I was always wondering how
>> I could get at the font definitions of the chars.
>
> Me too. :-)
>
>
> _______________________________________________
> Microbit mailing list
> Microbit at python.org
> https://mail.python.org/mailman/listinfo/microbit

Microbit Info Page - Python<https://mail.python.org/mailman/listinfo/microbit>
mail.python.org
The MicroBit is a small programmable device for children created by the BBC (in partnership with various other organisations, such as the PSF).



>
_______________________________________________
Microbit mailing list
Microbit at python.org
https://mail.python.org/mailman/listinfo/microbit

Microbit Info Page - Python<https://mail.python.org/mailman/listinfo/microbit>
mail.python.org
The MicroBit is a small programmable device for children created by the BBC (in partnership with various other organisations, such as the PSF).



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/microbit/attachments/20161118/7410b9e9/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: microbit-adafruit-15x7-CharlieWing-Display.jpg
Type: image/jpeg
Size: 313543 bytes
Desc: microbit-adafruit-15x7-CharlieWing-Display.jpg
URL: <http://mail.python.org/pipermail/microbit/attachments/20161118/7410b9e9/attachment-0001.jpg>


More information about the Microbit mailing list