Questions tagged [memory-usage]

Use this tag for questions about memory usage on the Arduino.

13 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
173 views

why is memcpy of unsigned long killing my sampling speed?

I'm using a Mega 2560 to communicate with a mixture of analog (i.e. measured via analogRead()) and I2C based sensors. Sampled data is placed in a 16 byte array, then written to an SD card once a 512 ...
2
votes
0answers
104 views

Storing an array of objects

I followed the instructions of this post: Storing an array of function pointers. To show my problem I shorted my code extremely but the problem is still there. My classes are defined as followes: ...
1
vote
0answers
40 views

ESP8266 NodeMCU running out of heap

I'm trying to create SMS alarm using Twilio, Firebase and Arduino IDE. Using sensors I am measuring the temperature. If the temperature is higher than a specified value (ESP reads that value from ...
1
vote
0answers
38 views

Having a bunch of global variables or calculate them on the go on an Arduino, as far as memory is concerned

So I'm new in the arduino world but I have a grasp of object oriented programming, and decided to write a little library for running games on an arduino mega using a display. My question is, I'm ...
1
vote
0answers
17 views

Leonardo Board stops reading analog input

I'm currently writing software that reads in analog data, writes it into an instance variable array, then returns the address of the array. However, after a few iterations of loop, the program stops ...
1
vote
0answers
38 views

Understanding heap fragmentation

I finally understand why people do not allocate memory when it comes to micro-controllers. The reason is because as you allocate different objects on the heap of various sizes and then you delete them ...
1
vote
2answers
161 views

Serial printing from Flash Memory (F() macro, PROGMEM, sprintf_P, SPTR)

I have been testing on an Arduino UNO various techniques for serial printing from Flash Memory instead of RAM. At the same time, I have been using the freeMemory() function from Adafruit. I created a ...
1
vote
2answers
240 views

Memory problem? dtostr() and strcat()

I've been dealing with this for quite a while now and searching all over for answers.. I'm trying to put together two floats into a char*. Separated by a ",". This is the code I'm working with. #...
1
vote
0answers
94 views

Radio tx/rx makes my oled screen not work

I've been struggeling with this assignment for school for a couple of days. I have finally figured out where the problem lies. I have an oled screen that is supposed to print out the temperature of a ...
1
vote
0answers
368 views

Writing objects to PROGMEM

A few days ago I encountered memory problems (SRAM shortage) on my Arduino. I've read a lot and fixed the problem, now I have around 900 bytes free in SRAM. However, I still have difficulties ...
0
votes
0answers
35 views

Port manipulation: Coding for two chips

I am using Arduino Nano to test a code that will be ported on an ATTiny chip, which will need to perform operations at a frequency near clock maximum, calling for a very succinct coding. My goal: to ...
0
votes
1answer
103 views

Memory usage in AnalogBinLogger of SdFat library

The AnalogBinLogger.ino file of SdFat library says the following: Each 512 byte data block in the file has a four byte header followed by up to 508 bytes of data. (508 values in 8-bit mode or 254 ...
-2
votes
1answer
53 views

Any limitation on array size in Arduino Mega 2560?

I am writing an Arduino code with 3 arrays. Two of those are double and other one is int. Further first two arrays have nearly 420 elements for each. Now I noticed that with more that 89 elements on ...