Linked Questions

19 votes
5 answers
191k views

I'd like to make three arrays of the same length. According to the documentation, Arrays must be defined as int myArray[10]; where 10 can be substituted for a known length (another integer), or filled ...
user3.1415927's user avatar
12 votes
4 answers
9k views

I previously asked this question: Is it required to delete variables before going to sleep? On that question, @Delta_G posted this comment: ... Really on a microcontroller I would create the object ...
Tono Nam's user avatar
  • 986
3 votes
2 answers
4k views

I am using the dynamic memory in AVR microcontroller, so How to know that there is collision between stack and heap or if the memory has been filled?
Ahmad Naoum's user avatar
0 votes
1 answer
7k views

I need to slice a string (eg- 4:288:18464:288:4) at ":" into an array({4, 288, 18464, 288, 4}) I used the following code, but its giving only '4' in the serial monitor when "4:288:18464:288:4," is ...
user3826856's user avatar
2 votes
3 answers
1k views

I know this question has been asked before, however it was asked two years ago and I have some other constraints to add. (Previous question here) : Is using malloc() and free() a really bad idea on ...
Brydon Gibson's user avatar
0 votes
2 answers
2k views

I need a function to return a 2x2 rotation matrix, something like: float matrix(float phi){ float R[2][2] = { {cos(phi), -sin(phi)}, {sin(phi), cos(phi)} }; return R; } But it ...
2012User's user avatar
  • 149
6 votes
1 answer
751 views

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 ...
watusimoto's user avatar
2 votes
3 answers
243 views

I'm trying to write a simple compiler in the Arduino language that I am making up for my lab. The compiler will have to be able to turn a string like this: "do command_one 3 times" into a data ...
Paul Terwilliger's user avatar
2 votes
1 answer
488 views

So I understand that generally speaking, dynamic allocation should be avoided. My question isn't how or why, but what happens when you call a function that allocates memory? On Windows or Linux, when ...
Dan Forever's user avatar
1 vote
0 answers
524 views

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 ...
Tono Nam's user avatar
  • 986
0 votes
2 answers
212 views

I'm trying to create a function that will take a String as an input, and at every 20 characters, it will instert "\n" so that the string doesn't go off the side of my screen (I'm using an ...
user avatar