"framebuf" module??????
"framebuf" module??????
Where can I find the "framebuf" module for running the FeatherWing OLED - 128x32 OLED??? I've been looking everywhere but can't find it. I am looking at running it on the pyBoard v1.1.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: "framebuf" module??????
It should be part of the standard firmware build. The following works on a Pyboard and a Feather Huzzah:
If you want to inspect the C source it's in extmod/modframebuf.c
Code: Select all
>>> import framebuf
>>> dir(framebuf)
['__name__', 'FrameBuffer1']
>>>
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: "framebuf" module??????
I am still running firmware version 1.3 haven't got around to updating it(Been having trouble uploading new fw). Guessing that could be the issue?
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: "framebuf" module??????
It's the only reason I can think of.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: "framebuf" module??????
is there any chance it will appear in the docs?
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: "framebuf" module??????
The framebuf module is under active development so docs may not be forthcoming just yet. You might want to search the forum for sample code. I can think of two sources: the official ssd1306 driver https://github.com/micropython/micropyt ... ssd1306.py and the work @marfis has done on the Limifrog http://forum.micropython.org/viewtopic.php?f=12&t=2736.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
"framebuf" module
Here I'm trying to output text onto SSD1322 display. So I've modified modframebuf.c to have GRAY4 (not sure how it is correct to call) mode.
https://www.youtube.com/watch?v=ypfTRDImBR8
https://www.youtube.com/watch?v=ypfTRDImBR8
Re: "framebuf" module??????
Implemented fill_rect too: https://www.youtube.com/watch?v=zfceKS-Bizk
There is a little bug remaining. After fixing it - is it possible to make THIS merged into master?
There is a little bug remaining. After fixing it - is it possible to make THIS merged into master?
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: "framebuf" module??????
I'm not sure if you're familiar with the procedure - you need to submit a PR (pull request). The maintainers will review it in due course. Once a patch is agreed they will incorporate it. I suggest you look at the developer docs including https://github.com/micropython/micropyt ... ENTIONS.md and the dev wiki https://github.com/micropython/micropython/wiki.
I've not looked at your code in detail but the maintainers may not like your changes to variable names. The choice of the English rather than American spelling of "colour" was deliberate.
I've not looked at your code in detail but the maintainers may not like your changes to variable names. The choice of the English rather than American spelling of "colour" was deliberate.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: "framebuf" module??????
I'm wondering why they did accepted situation when there are three kinds of naming it: "col", "color" and "colour" within 20 lines o_O I've just tried to make it same. Also I've seen "color" almost everywhere when it appeared (in other projects)pythoncoder wrote:maintainers may not like your changes to variable names. The choice of the English rather than American spelling of "colour" was deliberate.