Reduse memory use


#1

Hi! Best regards from Russia.
First, I want to tell everyone: I’M IN LOVE OF XOD!!
Second message for admins: can you please create categories for Bugs and for non-english-speaking users?

And here is my trouble (my board is NANO V3):
I try to create temperature and hummanity logger as in sample. Started from the end: created sd-log, created two diods which blinking on error or on successful write. Debug with watches - working very well! Then I created DHT-11 node, set up clock to it, add pulse-on-change nodes for temperature and hummanity and collected their pulses via “any” node to sd-log “W” pin. Working amazing!
After that I was added RTC node, unpack-datetime node and want to join all in one string via “join” node. Thats all. Not working.

I was spent about 4 days (all days, from dusk till dawn xD ) with reading docs, creating, analyse, recreating and debugging. Now I know that “problem” is in too much memory using of XOD.
Simple clock+rtc+unpack-datetime+join use 50% of storage spase and 47% of dynamic memory.

How can we fix this?
PS: sorry for poor English.


#2

Hello and welcome!

Yeah, it can be easily related to the resource shortage. Just to defense XOD a bit, the native Arduino SD library is a memory hog and XOD adds a very little to it. It alone takes 50% of Uno/Nano resources.

Nevertheless, there are problems in XOD itself. Notably, in its current state all intermediate computation results are kept in RAM. This is described in a GitHub issue already (#1390). We’ll implement it some day.

For now, unfortunatelly, the most viable solution is to get Mega 2560.

This one is a nice sample to analyze. Simple enough and producing wild results. Thanks for it, we’ll take a look.


#3

I believe it’s too early for it. Or we’d get Babel where all speak different languages and can’t help each other. I think the community has to grow 10× or more before it starts to make sense.

Don’t be shy to talk English with some mistakes. It is OK as long as you can be understood. Many people here are not native speakers.

Pssssst :shushing_face: Grammarly is very cool for people like us