Search found 5 matches

by Rendermaniac
Tue May 26, 2020 10:58 am
Forum: micro:bit boards
Topic: memory allocation error when file size reduces
Replies: 7
Views: 6392

Re: memory allocation error when file size reduces

And now just dividing a global variable by 1000 caused an allocation error! It seems that there are a lot more things than just file size which can cause this. This is very frustrating as I can't work out the exact conditions that cause these problems!
by Rendermaniac
Tue May 26, 2020 2:21 am
Forum: micro:bit boards
Topic: memory allocation error when file size reduces
Replies: 7
Views: 6392

Re: memory allocation error when file size reduces

My current code is here and seems to be working well:

https://github.com/rendermaniac/wbr/blo ... _logger.py

thanks

Simon
by Rendermaniac
Mon May 25, 2020 11:49 am
Forum: micro:bit boards
Topic: memory allocation error when file size reduces
Replies: 7
Views: 6392

Re: memory allocation error when file size reduces

I think it was actually something to do with the order I called functions from the driver library. Very weird. I also get a memory allocation error if I try to write to a file whose name is ten digits (including extension) or longer - is that a known limitation? The memory size definitely is very sm...
by Rendermaniac
Sun May 24, 2020 12:58 pm
Forum: micro:bit boards
Topic: memory allocation error when file size reduces
Replies: 7
Views: 6392

Re: memory allocation error when file size reduces

Actually I think it's something wrong with the driver that I am using:

https://github.com/pimoroni/micropython-envirobit

Simon
by Rendermaniac
Sun May 24, 2020 6:09 am
Forum: micro:bit boards
Topic: memory allocation error when file size reduces
Replies: 7
Views: 6392

memory allocation error when file size reduces

Hi I have been working on a project (to go in a water bottle rocket) to log altitude by plugging a micro:bit into an enviro:bit - which has a BME280 pressure sensor. I have run into memory allocation errors before, but this is a weird one - the code I have work fine until I started removing some lin...