We’re rewarding the question askers & reputations are being recalculated! Read more.

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1
vote
2answers
51 views

Is new without a delete acceptable?

I know it is not a good practice to use the new command to dynamically create data, however, if I would never use the delete, would it result in memory gaps/other problems? Background The reason I ...
0
votes
0answers
56 views

How can I fix a “MbedTLS error -17040” issue with my arduino code on ESP-32?

Despite several days of searching, I can't find any resources to check the MbedTLS error code "-17040". All of the error codes descriptions available are referencing only hex format errors (which the ...
0
votes
2answers
241 views

freeMemory() function from memoryfree library not returning decreased value in arduino UNO

I burned the code written below, I expect that as we declare the local variable in the loop, freeMemory() function should return decreased value. But it remains constant..! please explain why..? The ...
0
votes
1answer
36 views

MemoryFree library showing Irregular Behaviour..!

I simply burned the code written below but it is showing me irregular behaviour.. as in output's last paragraph, free memory increases after a runtime allocation, how it is possible? The output is ...
0
votes
3answers
74 views

storage problem

I made a Arduino program to control my air conditioner(model:GREE Lomo) by PC. I download IRremote library from here for that. #include "IRremote.h" IRsend irsend; int irPin = 3; // pin IR led int ...
1
vote
1answer
34 views

Runtime Error when using array of structs of unknown size as variable within class - some kind of overflow issue?

I have a class defined as below, it's basically a simple ring buffer, with some methods for getting useful statistics from the data held in the buffer. enum BalanceMsgType{ BAL_MSG_NOT = 0, ...
0
votes
1answer
177 views

How to read main code inside main code in Arduino?

How can I read the hex code of the main programme stored inside flash memory inside my running Arduino programme? So far I am able to read the Flash at any given address by using PROGMEM unsigned ...
5
votes
3answers
2k views

When to use PROGMEM?

I believe PROGMEM is used to store large data (e.g. strings) that don't change. So it frees up the SRAM. in the Ardunio Reference it is mentioned that. "Using PROGMEM is also a two-step procedure. ...
1
vote
2answers
1k views

Const data optimisation for Arduino

I'm taking a course on Arduino Uno programming and on today's talk I heard that the const data is optimized by Arduino, so that it occupies less space than the actual data type (namely, a const int ...
0
votes
2answers
350 views

What are safe memory usage limits?

The Arduino IDE used to warn you when your sketch used too much memory. This warning now seems to have been removed. I compiled a sketch, and was surprised to see it use 175% of data memory...but not ...
0
votes
3answers
574 views

Arduino constant vs Microchip PIC constant

2.2 THE BASICS OF C PROGRAMMING LANGUAGE book is has like this, CONSTANTS A constant is a number or a character having fixed value that cannot be changed during program execution. Unlike ...
2
votes
2answers
3k views

Arduino String memory allocation

When a String variable is declared and modified inside a function, where does it go? To the heap(as string declaration is a part of dynamic memory allocation) or to the stack(as it is a part of ...
2
votes
1answer
1k views

Arduino Nano memory issue. SD card and LCD screen together

When i am uploading my code to arduino nano, i am getting message about high dynamic memory usage (87%): Sketch uses 17,628 bytes (57%) of program storage space. Maximum is 30,720 bytes. Global ...
0
votes
1answer
1k views

delete or free on object causes Arduino to hand or reboot

I've read a lot about dynamic allocation for strings or buffers, but that's not my case. I plan to implement much blinkers types as classes, all inheriting from a base Action class. I declare an ...
6
votes
1answer
14k views

int VS uint8_t VS uint16_t

This question is quite clear. What are the differences between an int, an uint8_t, and an uint16_t. I know it has to do with bytes and memory but can someone clarify me a bit? Things I want to know: ...
1
vote
2answers
2k views

Most memory efficient way to program

I currently know 3 ways to do a program. Which one of them is the most memory friendly. Note that the example code is simple (blinking a led) and the final code will be VERY VERY complex. Also, the ...
1
vote
3answers
3k views

Is there any way I can connect the RAM of a computer to Arduino?

I was thinking about a way to reuse the RAM of my old computer on my Arduino board. I was thinking about some peojects using neural networks, and more RAM would let the Arduino use more neurons. So ...
2
votes
1answer
860 views

Is the a low memory alternative to SoftwareSerial?

I'm running a program on a ATtiny85 and running into problems because of a lack of available RAM. When I ran avr-nm on my ELF file I found that SoftwareSerial was taking up a lot of RAM even though I'...
0
votes
2answers
213 views

Would rewriting my code in C help reduce RAM usage? [duplicate]

So my program fails to run because there is not enough room for my variables as well as the Arduino Core and Stack. I can't find any more ways to optimize my program so I'm thinking about just ...
2
votes
1answer
1k views

What is using up all the RAM in my program?

I am running a program on the ATtiny and for some reason I am way over the 512 bytes of RAM that are available to me. This is confusing because when I did the math by hand I should have 432 bytes. ...
5
votes
3answers
12k views

Can you access the EEPROM of an ATtiny with Arduino Code?

I'm attempting to reduce the amount of RAM being used by my program by writing some values to the EEPROM of my micro controller. I'm currently programming on the ATtiny85 which has 512 Bytes of EEPROM....
1
vote
1answer
509 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 ...