Search found 1364 matches

by deshipu
Sat Feb 01, 2020 1:13 pm
Forum: Development of MicroPython
Topic: Compiling _stage.mpy
Replies: 4
Views: 959

Re: Compiling _stage.mpy

For anyone struggling with a similar problem, here is a missing piece of documentation: https://github.com/tve/micropython/comm ... dd114d4fae
by deshipu
Thu Jan 16, 2020 4:48 pm
Forum: General Discussion and Questions
Topic: Combo of a C and python module?
Replies: 6
Views: 1060

Re: Combo of a C and python module?

You can allegedly do that in the newest version, by generating a .mpy module following: http://docs.micropython.org/en/latest/develop/natmod.html — look at the example at https://github.com/micropython/micropython/tree/master/examples/natmod/features2 However, I haven't managed to get a non-trivial ...
by deshipu
Sun Dec 29, 2019 4:20 pm
Forum: Development of MicroPython
Topic: Compiling _stage.mpy
Replies: 4
Views: 959

Re: Compiling _stage.mpy

I gave it another go. This time I installed the latest version of python3-elftools, which "fixed" the AttributeError. However, I still get the symbol not found error for "mp_obj_get_array", which is, come to think about it, very suspicious, because other symbols from the py/obj.c are found without p...
by deshipu
Wed Dec 25, 2019 9:36 pm
Forum: Development of MicroPython
Topic: Compiling _stage.mpy
Replies: 4
Views: 959

Re: Compiling _stage.mpy

The fight continues. After changing the "if s.data_size == 0:" line in mpy_ld.py to "if getattr(s, 'data_size', 0) == 0:" I get a new error. This time it can't find the symbol mp_obj_get_array, which is used in my code. What to do? The function is defined in py/obj.c, so I tried adding it to SRC. Un...
by deshipu
Wed Dec 25, 2019 9:17 pm
Forum: Development of MicroPython
Topic: Compiling _stage.mpy
Replies: 4
Views: 959

Re: Compiling _stage.mpy

I figured that one out, you can't use any _ROM_ functions, so the creation of classes is a bit more involved and has to be done in the init funcvtion. The framebuf module is a good example of that. However, now I'm getting: Traceback (most recent call last): File "../../../micropython/micropython/to...
by deshipu
Wed Dec 25, 2019 7:33 pm
Forum: Development of MicroPython
Topic: Compiling _stage.mpy
Replies: 4
Views: 959

Compiling _stage.mpy

Hello, I was very happy to see the native modules being added to release 1.12, as described at http://docs.micropython.org/en/latest/develop/natmod.html so I decided to go and try to compile my "stage" game library this way, because a lot of people wanting to use it are unable to compile their own f...
by deshipu
Tue Oct 01, 2019 8:30 pm
Forum: Programs, Libraries and Tools
Topic: Reading GIF files
Replies: 0
Views: 1296

Reading GIF files

We usually use BMP (or worse) images for our microcontroller projects, because with no compression they are relatively easy to read and stream directly from the flash memory. However, they come with their downsides, large size being just one of them. So I looked around at how GIF files are parsed by...
by deshipu
Sun Aug 04, 2019 10:21 am
Forum: Programs, Libraries and Tools
Topic: Stage — a tile and sprite engine for making games
Replies: 3
Views: 1652

Stage — a tile and sprite engine for making games

Hello everyone, it's me again. It's been a while since I last posted here, but I came back just for a moment to tell you about my library. Ever since I started my work on the µGame console, I had my game library working both in MicroPython and CircuitPython, but since CircuitPython was better for be...
by deshipu
Mon May 20, 2019 1:30 pm
Forum: Programs, Libraries and Tools
Topic: font454.py — a tiny 4x5 pixel antialiased font for low-resolution displays
Replies: 10
Views: 4339

Re: Using your font on a Nokia 5110 PCD8544 84x48 LCD

could you explain better what are the 4 colors for and if they are needed on a monochromatic display? It can be used for anti-aliasing when your display has more than 2 colors/shades available, and for making the font look heavier/lighter when it only has 1-bit display. Basically, if you make it 0-...
by deshipu
Sun May 05, 2019 3:57 pm
Forum: ESP32 boards
Topic: ILI9225 TFT display driver
Replies: 8
Views: 1933

Re: ILI9225 TFT display driver

Just take one of the existing drivers, take the datasheet, and make it. It's not rocket surgery. You will probably only need to make small modification to the initialization commands, everything else should be exactly the same. Do you know where I can look at some examples of how to adapt libraries...