Giter Club home page Giter Club logo

Comments (5)

roryjamesallen avatar roryjamesallen commented on June 1, 2024

I believe this has been fixed in a more recent version of the europi library by changing 'r' to 'a+' to allow the file to be created if not present. I've just had a go with a freshly nuked Pico and it doesn't seem to throw an error and it does generate the calibration.txt file when required by an external program (even if the europi.py program has not been run as a script yet)

from europi.

awonak avatar awonak commented on June 1, 2024

I'm also getting the following error after the first prompt for 1V:

MicroPython v1.17 on 2021-09-02; Raspberry Pi Pico with RP2040
Type "help()" for more information.
>>> %Run -c $EDITOR_CONTENT
Traceback (most recent call last):
  File "<stdin>", line 231, in <module>
  File "<stdin>", line 129, in read_duty
MemoryError: memory allocation failed, allocating 32768 bytes
>>> 

This can be fixed by reducing the samples on europi.py line 222:
https://github.com/Allen-Synthesis/EuroPi/blob/main/software/firmware/europi.py#L222

I dropped the value down to 2048 and it fixed the error and completed successfully.

from europi.

awonak avatar awonak commented on June 1, 2024

I must have been an old version of europi.py because I'm unable to reproduce. Thanks for the explanation!

from europi.

awonak avatar awonak commented on June 1, 2024

I got this error again and traced down the root cause. I was initializing my nuked pico by copying europi.py to the root directory and omitted creating the lib directory. When lib is not present, micropython throws an error trying to read/write to a folder that does not exist on the pico.

from europi.

roryjamesallen avatar roryjamesallen commented on June 1, 2024

Ahh that is a very good find. An edge case for sure but I'll look at writing something in that gives a useful error message if it thinks it's being run outside of the lib folder

from europi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.