Search found 13 matches

by workless
Mon Apr 02, 2018 5:12 pm
Forum: General Discussion and Questions
Topic: Disk space error
Replies: 4
Views: 3274

Re: Disk space error

What does uos.statvfs('/flash')[1]*uos.statvfs('/flash')[2] tell you? I see 97280 bytes. That does return 97280. I have also noticed that when the FLASH drive first mounts it says 69k for a few seconds before switching to 235.7 MB. Maybe I shouldn't be concerned - is it just my computer getting con...
by workless
Sat Mar 31, 2018 2:30 am
Forum: General Discussion and Questions
Topic: Disk space error
Replies: 4
Views: 3274

Re: Disk space error

I found the correct documentation on how to factory reset now: http://docs.micropython.org/en/v1.8.6/pyboard/pyboard/tutorial/reset.html?highlight=reset Everything is back to factory state. I guess I need to me more careful about memory addressing... Although Finder still says there is 235.8 MB avai...
by workless
Sat Mar 31, 2018 1:44 am
Forum: General Discussion and Questions
Topic: Disk space error
Replies: 4
Views: 3274

Disk space error

I've been merrily coding on a PyBoard for a day or two including in assembler (crashing things quite a few times) and suddenly now getting file system errors: - Syntax errors in script files that were too long - When I try to move a new file to the flash drive it says "Not enough disk space to copy ...
by workless
Wed Mar 28, 2018 7:41 am
Forum: Programs, Libraries and Tools
Topic: Matrix manipulation modules (umatrix, ulinalg)
Replies: 14
Views: 13371

Re: Matrix manipulation modules (umatrix, ulinalg)

I found out the reason for the poor performance of arrays compared to lists. It's explained [here](https://stackoverflow.com/questions/367 ... rrays-slow). But I agree on the benefits of arrays. They are also a good way of storing data when memory is tight.
by workless
Wed Mar 28, 2018 5:08 am
Forum: Programs, Libraries and Tools
Topic: Matrix manipulation modules (umatrix, ulinalg)
Replies: 14
Views: 13371

Re: Matrix manipulation modules (umatrix, ulinalg)

I just discovered that even existing built-ins such as `sum` are slower on MicroPython `arrays` than on lists. So while they are a more efficient way of storing data they have no speed advantage it appears. >>> from array import array >>> data = [float(pyb.rng())/2**30 for i in range(100)] >>> x = a...
by workless
Wed Mar 28, 2018 4:54 am
Forum: Programs, Libraries and Tools
Topic: Matrix manipulation modules (umatrix, ulinalg)
Replies: 14
Views: 13371

Re: Matrix manipulation modules (umatrix, ulinalg)

I am going to be porting all my robots across from RPi to ESP32 running Micropython. Hi @OutoftheBOTS_. That's good to hear. I am also interested in Robot control in real time. Can you give us an idea what math functions you use for control of your robots and if you need any specific array calculat...
by workless
Tue Mar 27, 2018 5:35 pm
Forum: General Discussion and Questions
Topic: Calling built-in functions from Assembler
Replies: 3
Views: 2378

Re: Calling built-in functions from Assembler

Calling maths functions written in C rather begs a question. Why not implement the whole module in C? So there is a c-compiler included in the Micropython OS? Or do I have to rebuild Micropython itself with my module included? I think this answers my question: You might want to use one of the exist...
by workless
Tue Mar 27, 2018 5:31 pm
Forum: General Discussion and Questions
Topic: Calling built-in functions from Assembler
Replies: 3
Views: 2378

Re: Calling built-in functions from Assembler

Calling maths functions written in C rather begs a question. Why not implement the whole module in C? Thanks. I didn't realize that the math module was written in C. I guess when I heard that Micropython 'runs on the bare metal' I thought it meant it was implemented directly in assembly! So there i...
by workless
Mon Mar 26, 2018 10:28 pm
Forum: General Discussion and Questions
Topic: Calling built-in functions from Assembler
Replies: 3
Views: 2378

Calling built-in functions from Assembler

Is there a way to call built-in functions such as those in the math module from a user-defined function written in assembler? I started writing some functions (https://github.com/billtubbs/array_funcs) to vectorize basic algebra operations for Micropython arrays. Example: @micropython.asm_thumb def ...
by workless
Mon Mar 26, 2018 10:07 pm
Forum: Programs, Libraries and Tools
Topic: Matrix manipulation modules (umatrix, ulinalg)
Replies: 14
Views: 13371

Re: Matrix manipulation modules (umatrix, ulinalg)

Peter, thanks for your comments. I agree, implementing arrays into the existing module might be a lot of work and put some constraints on the data types and functionality. Maybe it's best to keep this 'high performance' array functionality as a separate project. It would still take a lot more work t...