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

learn more… | top users | synonyms

0
votes
1answer
15 views

Serial problem after implementing data structures

Context I first ran a sketch (on Arduino Uno) without any custom data structure and list, so I was using a bunch of arrays, methods and other primitive variables. And it worked perfectly. My program ...
2
votes
1answer
47 views

What will use less memory, an array or if … else?

I'm trying to make my sketch smaller. Right now I use an array for the AM/PM part of my time display. My thinking is this makes it easy to change the formatting: char* ampms[]= {"am", "pm"}; void ...
4
votes
1answer
342 views

Why does this code execute?

After experiencing failures of my Arduino projects due to low memory, I decided to do some research into it so I could understand better where the problems were. I eventually came to this code: void ...
1
vote
1answer
89 views

any way to run binary code from RAM?

I am looking for an unexpensive single board computer that I could program in assembly language, using limited facilities to load the object code from a PC and simple I/O peripherals. Ideally I would ...
0
votes
1answer
29 views

Serial3.available loop issue

I am trying to read information coming from an Atlas Scientific FLO30 chip. The following code works fine in an individual sketch: String inputstring = ""; ...
0
votes
2answers
142 views

How to write data in RAM memory using Arduino Uno or Arduino Due?

I know that it is possible to write data in ROM(Read Only Memory). But what about if I want to write data in RAM(Random Access Memory)? Can I do it using "Arduino Uno R3"? RAM is normally associated ...
0
votes
1answer
46 views

How do I know how many memory that Arduino is use after my code is running for a few time [duplicate]

When I upload my program to Arduino it says the memory that the program is used. But what if I use a bad management of dynamic memory, or any object is created several times in use a lot of memory and ...
1
vote
1answer
60 views

Measure SRAM usage

I am using an Arduino with 2048 bytes of SRAM. I have a complex project so that it is no longer obvious how much SRAM it would use in total (there is not one large dominant object but many different ...
4
votes
1answer
75 views

Overview of compiled code size

When I compile my code, the Arduino IDE returns the binary sketch size in byte. Is there a good way to find out (approximately) what function or what part of my code takes up how much memory in ...
0
votes
2answers
61 views

How to increase Arduino's memory to save Dot Matrix Library?

I need to display some dynamic Chinese characters to 12864 using Arduino. What to show is transported from my web server. The character is stored as a 16x16 dot matrix, needing 16*16/8=32 byte. And I ...
0
votes
1answer
102 views

Memory Problems on Arduino Uno

I am doing a project using Arduino UNO, cc3000 WIFI chip, micro SD card shield, and a TTL serial camera in order to make a security system that will post a picture online (not enough processing power ...
1
vote
1answer
133 views

Am I Running Out of RAM Or Not?

I'm attempting to drive 300 TM1803 RGB LEDs from an Arduino Uno using the FastLED library. My code works fine for 100 LEDs, but when I go to 150, the arrays that store LED values and my sensor data ...
1
vote
1answer
96 views

How can I analysize large packets on an arduino?

I'm trying to send a large packet to an arduino with an ethernet shield on it? I'm using the built in RX buffer of W5100 controller to store the data, but I need more memory (at least 16K of buffer ...
1
vote
2answers
120 views

Is there any way that the values here be converted to another variable and not string?

int val1 =(mfrc522.uid.uidByte[0]); int val2 =(mfrc522.uid.uidByte[1]); int val3 =(mfrc522.uid.uidByte[2]); int val4 =(mfrc522.uid.uidByte[3]); String valA=String(val1); String valB=String(val2); ...
1
vote
1answer
175 views

Are my arrays stored in sram or in Flash?

I have the following memory allocation: unsigned char g1[]={ 0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ....0x00 ,0x00 ,0x00 ,0x00 ,0x00 }; g2[]={ 0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ...
0
votes
0answers
43 views

Efficient way to store datastructure on SD

I have an ATMEGA 2560 with ~ 8000 bytes of SRAM. I've done a lot of memory optimization, but i still have one class, which is quite large(~200bytes). It's changed one time on runtime and then only ...
0
votes
2answers
108 views

releasing memory in sub-function

I'm doing a program who get a line from the SD and shows it, this function is called getData() FULL CODE: #include <SD.h> #include <MemoryFree.h> File myFile; int stringIndex = 0; int ...
0
votes
0answers
122 views

Fast Data Logging of 250Hz analog signal to SDcard via Arduino Uno + Arduino WiFiShield

I have to store sampled data of a low frequency SineWave of 250Hz into a SDcard via the Arduino WiFi Shield. Note that I am relatively new to the Arduino world. Detailed Requirement Specs: 1) ...
0
votes
1answer
169 views

Can arduino create a file in its memory?

I am an arduino enthusiast and i am new to it.just wanted to know weather the micro processor itself could create a file in its memory while its is running. I know that it is possible to read a write ...
5
votes
3answers
1k views

PROGMEM: do I have to copy data from flash to RAM for reading?

I have got some difficulties understanding the memory management. Arduino documentation says, it is possible to keep constants like strings or whatever I don't want to change during runtime in ...
1
vote
3answers
297 views

Is it bad coding practice to design a buffer using pointers?

I coded a ring buffer for my Arduino to buffer data from either the SPI or TWI ports. In the .h file I used a pointer for the buffer: typedef uint8_t *ring_buffer_t; typedef uint8_t ring_count_t; ...
6
votes
5answers
1k views

How is stack memory used for fuctions and local variables?

I wanted to save some values to the EEPROM and also wanted to free up SRAM by avoiding some variable declarations, but EEPROM memory is byte wise. If I want to store an int value, I have to use some ...
7
votes
1answer
3k views

Can I write to Flash Memory using PROGMEM?

On the documentation of Arduino, I quote: http://playground.arduino.cc/Learning/Memory Note: Flash (PROGMEM) memory can only be populated at program burn time. You can’t change > the values in ...
8
votes
5answers
2k views

Efficient algorithm/data structure to calculate moving averages

Currently I am developing a graphic LCD system to display temperatures, flows, voltages, power and energy in a heat pump system. The use of a graphic LCD means that half of my SRAM and ~75% of my ...