Skip to content

MicroPython consumes too much memory and causes memory allocation error on V1 micro:bits #784

@JackAtKitronik

Description

@JackAtKitronik

Describe the bug
Using the micro:bit Python Editor, we were trying to add servo and LED functionality to the Kitronik MOVE Motor MicroPython library. Upon adding the servo code (about 20 lines of code) the code is now too big and when put on the V1 micro:bit it causes a memory allocation error saying memeory allocation failed, allocating 398 bytes.

To Reproduce
Steps to reproduce the behavior:

  1. Open https://python.microbit.org/v/3/project
  2. Save KitronikMOVEMotor.py
  3. Add the code at MOVEMotor.py to main.py
  4. Download the code onto a V1 micro:bit
  5. The error memory error, memeory allocation failed, allocating 398 bytes appears

Expected behavior
Following the same steps on as above but the program works on a V1 micro:bit.
On a V2 micro:bit then the code works as expected.

micro:bit version
V1 micro:bit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions