Comments (6)
Yes, I can just use my Raspberry directly and interface my GPS module with it, but I have my reasons why I want the NodeMcu as the point of data capture (for example it's smaller and cheaper).
from micropygps.
I did some experiments with the mem_info
within the Unix version of micro python to see just how much memory was being consumed on import:
>>> from micropython import mem_info
>>> mem_info()
mem: total=6681, current=2911, peak=4486
stack: 928 out of 80000
GC: total: 2072832, used: 4096, free: 2068736
No. of 1-blocks: 41, 2-blocks: 21, max blk sz: 41, max free sz: 64640
>>> from micropyGPS import MicropyGPS
>>> mem_info()
mem: total=107812, current=29518, peak=92472
stack: 928 out of 80000
GC: total: 2072832, used: 33824, free: 2039008
No. of 1-blocks: 300, 2-blocks: 45, max blk sz: 80, max free sz: 61718
As a quick test, I deleted all the "test" at in the __main__
section and re-ran the import test. Surprisingly, the usage was much lower
>>> from micropython import mem_info
>>> mem_info()
mem: total=8610, current=2980, peak=4555
stack: 928 out of 80000
GC: total: 2072832, used: 4000, free: 2068832
No. of 1-blocks: 46, 2-blocks: 17, max blk sz: 41, max free sz: 64643
>>> from micropyGPS import MicropyGPS
>>> mem_info()
mem: total=87457, current=22271, peak=70409
stack: 928 out of 80000
GC: total: 2072832, used: 25280, free: 2047552
No. of 1-blocks: 196, 2-blocks: 30, max blk sz: 80, max free sz: 62461
I re-ran the test several times and got similar numbers. I went ahead and stripped the the code from __main__
and pushed it into a separate tests.py. It's very interesting that just importing the class brings in all that other code from the main module. Maybe a bug in Micropython?
from micropygps.
I can reproduce this. I need to think about how to reduce memory use even more (possibly precompiling to frozen bytecode) because I'm also running a bunch of other i2c devices on the same nodemcu.
from micropygps.
Also, the nodemcu board might have 128kB RAM, but less than 50kB are available once the underlying RTOS and micropython are load.
from micropygps.
@markserrano915 @inmcm @ckuethe
I've been trying to use this library on Wemos D1 Mini Lite 1.0.0.
Here it is the output:
>>> from micropython import mem_info
>>> mem_info()
stack: 2096 out of 8192
GC: total: 35968, used: 10240, free: **25728**
No. of 1-blocks: 26, 2-blocks: 4, max blk sz: 264, max free sz: 554
>from micropyGPS import MicropyGPS
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
MemoryError: memory allocation failed, allocating 832 bytes
from micropygps.
I could use the library on an ESP32 after precompiling it as a frozen module.
from micropygps.
Related Issues (20)
- Unable to read data from GPS HOT 2
- RFC: RAM utilisation optimisations
- GSV failing at 12 satellite HOT 1
- Calculation of local_offset is incorrect HOT 1
- date_string long format shows incorrect suffix on 23rd of month HOT 1
- RMC parsing should reject sentences with data valid False HOT 1
- SENTENCE_LIMIT = 76
- date value from RMC string not stored like timestamp HOT 1
- my_gps.update() always returns None for RMC messages HOT 3
- Unhandled exception occured HOT 5
- Produces decimal degrees that are incorrectly formatted.
- dd - decimal precision.
- IndexError, possibly from incomplete GPS data HOT 1
- End of GPVTG not detected HOT 1
- local_offset does not work correctly with non-integer values
- New Feature
- local_offset cause wrong date.
- Statement support is missing
- Error in GPGSA
- date_string long format shows incorrect suffix on 23rd and 3rd of a month
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from micropygps.