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

learn more… | top users | synonyms

1
vote
1answer
54 views

EEPROM - Storing Static Data

I'm trying to store four items to EEPROM. I can do one item no problem, I just don't know how to make the jump to multiple items. My code: #include <EEPROM.h> char sgrpID[31] = "acpilot's ...
0
votes
1answer
52 views

send serial monitor to server and save data in hdd [closed]

I'd like stream data to my disk via serial and then send it to a central server. e.g. log an event. i wouldn't use any separate modules. Any helps appreciated.
3
votes
2answers
142 views

What is the best way to get more RAM for a sound buffer?

The problem: How to extend the memory for a sound buffer (intensively used) if: SD card library supports only one file open at a time (and I have one open already) EEPROM chips are able to stand ...
-2
votes
0answers
35 views

One byte hash for ID data summarizing in Arduino

I am making RFID access system with Arduino. I have 4 keys(byte) to detect each RFID Card.So,I need to store all bytes in my Arduino memory.It will consume lot of Arduino memory.So,I think about ...
0
votes
1answer
27 views

'Non-Deterministic' memory usage on Arduino

I had a problem with a memory leak in my sketch and cornered it with MemoryFree.h. This works great and I was able to fix my leak. My sketch is not really static, but My var sizes are. I observed, ...
1
vote
2answers
55 views

Forensic security of Arduino (SRAM)

Pardon the double post, but I'm not getting much traction with this question over at arduino.cc so I'm looking for answers here now. Original post: http://forum.arduino.cc/index.php?topic=391698.0 ...
1
vote
3answers
44 views

Is this function subject to memory fragmentation?

I'm trying to understand if the following bit of code is subject to memory fragmentation. Let's say I incrementally build a string within a function and I don't know how large the string should be. ...
0
votes
1answer
37 views

Shared Memory using SHM Library

I am trying to read sensor data from a FIFO buffer embedded in the sensor (LSM9DS1), and store that data on a Teensy 3.2 board to later be put in a file. I can only read 6 bytes at a time from the ...
1
vote
1answer
54 views

Connecting Winbond W49F002U-12B to Arduino Mega

I am trying to connect a CMOS flash memory Winbond W49F002U-12B to an Arduino Mega, but failing. What I did: Read the Winbond W49F002U-12B datasheet. The key points are: CE - chip enabled; OE - ...
4
votes
2answers
40 views

At what level does low dynamic memory effect performance?

I have a few Arduino sketches that take 70-90% of dynamic memory. It seems that over 70%, the compiler gives the warning: Low memory available, stability problems may occur. but otherwise I wasn't ...
0
votes
0answers
40 views

Memory reduction in converting Serial.read to int/byte from 0-255

I'm taking rgb values in over Serial in a format like c-255 255 255. I currently have this code, struct RGB { int r; int g; int b; }; struct RGB getRGBValues(char* rgbcode) { char *rgbend; ...
6
votes
1answer
120 views

Understanding global variables on Arduino

I am rewriting a set of LED manipulation functions to be more object oriented, and I have found that, mysteriously, my global variable memory space has been over consumed, despite a reduction of the ...
4
votes
2answers
49 views

Use large variables without using much memory

I've wired up a dot matrix, and I display characters on the screen by using something like the example code below. The Char_B variable is a global variable in a library used by the Arduino, and ...
0
votes
0answers
38 views

Is there a lean or modular SD library?

I'm using the SD library to perform two simple tasks. reading a configuration file writing a logfile I don't want to use subdirectories and can live with only two filenames. However, after ...
0
votes
1answer
275 views

Store String using F() Macro

I'm new to the Arduino and do not quite understand the F() macro yet. In my code, I have a String, and as I want to transfer it via WebServer, I need to write it to the answer. Somehow I need to ...
3
votes
1answer
71 views

What is the memory expense of creating a String from a char array?

I'm writing a little API for processing email messages in Arduinos. Obviously, I need to keep memory use down, but I also want to allow the end user to use the String functions (like indexOf) to ...
2
votes
2answers
63 views

Arduino Uno - why doesn't memory leak crash the program?

I wrote this test program: void loop() { digitalWrite(13,1); delay(300); digitalWrite(13,0); delay(300); void *a = malloc(10000000000000000000000000000000000000000); } ...
0
votes
2answers
98 views

Clearing SRAM in loop()

Very broad question here. I don't know exactly what the problem is but I'll edit this post as we narrow down the possibilities. I think I'm running into memory constraints. I'm running a sketch ...
0
votes
2answers
55 views

How to prevent inclusion of unnecessary libraries?

How do you save space by preventing the inclusion of unnecessary binaries? When I compiled the ROS Blink example, I received the warning: Global variables use 1,951 bytes (76%) of dynamic memory, ...
3
votes
2answers
211 views

How to correctly pack an unsigned long from 3 unsigned chars?

I would like to use 652 unsigned long values on an Arduino Uno, but it doesn't look like there's enough memory. I thought about the splitting unsigned long values to 3 unsigned chars to store in ...
6
votes
2answers
401 views

OOP vs Inline with Arduino

I have been programming for quite a while now but I am new to Arduino and AVR Programming. The main question I have about programming these Micro-controllers is are there major differences in ...
0
votes
0answers
19 views

Erratic storage space? (adding code results in less storage !?)

When I call a function that itself calls another one inside a small library, Arduino 1.6.4 (and .5) report a smaller program storage space than when I call the "inner" function only : The code inside ...
0
votes
1answer
48 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
78 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
359 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 ...
2
votes
1answer
196 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
96 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 = ""; ...
1
vote
3answers
908 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
63 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
137 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 ...
5
votes
1answer
125 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
133 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
263 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
262 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 ...
0
votes
1answer
237 views

How can I analyse 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
189 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
274 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
2answers
162 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
1answer
367 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
3k 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
429 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
2k 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 ...
8
votes
1answer
5k 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
3k 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 ...