Questions tagged [vector]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
30 views

Accessing funcition in object via `->` is crashing (resetting) Arduino

I have several classes that call each other running on an Arduino Mega. I am using the ArduinoSTL library to get the std library, most notably the std::vector. The core problem is as follows: my ...
2
votes
1answer
2k views

Does Arduino C++ support dynamic arrays of objects

My C++ is seriously out-of-date, and I'm working on a project that will be juggling multiple timed actions at the same time, with a menu system to manage the interface and control those timed actions (...
0
votes
3answers
86 views

Is it possible to insert your own routine into the Reset procedure

I'm working with ATmega328 NANO boards, and I would like to know if it is possible to INSERT my own routine, to be included in the things done during reset, BEFORE any pre-C initialization is done, ...
0
votes
1answer
228 views

Which container to use?

So for my project, I am measuring heartbeat of a person in a span of 10s. However, as the number of heartbeats may differ for each person, is it wise to use a vector?
0
votes
1answer
644 views

How to declare a Dynamic Array?

I want to define an unknown size for an array. However, I know that this cannot be done on the arduino. So what other methods do you suggest? I tried using vectors by downloading the library ...
1
vote
1answer
72 views

Arduino restarts when a function is called

When I call a function, get_split(), the Arduino restarts. I have tried to find what is causing this, but I have had no luck. Here is my code: std::vector<std::vector<std::vector<std::vector&...
1
vote
2answers
563 views

arrange vector in descending order

im trying to arrange the vector in descending order but its not happening.. int fibonacci[15]={0, 1}; int a=0; void setup() { Serial.begin(9600); for (int i=0; i<=14; i++) //loop to create ...
1
vote
2answers
425 views

Object Array using Inheritance

I would like to create an array of a generic type so I can use multiple sensors and make my code as extensible as possible. /* Planning for good design. Agent library should be able to use more ...
0
votes
3answers
2k views

Building a Vector class in Arduino

I'm struggling with this issue that I can seem to get around of. When defining a vector class, I'm seeming to get some issues when deleting the allocated pointer. Oddly enough, this only happens ...
5
votes
2answers
10k views

Current Arduino STL Libraries

I was going to update this question but I thought that this was different. I have been trying to get std::vector to work with the latest Arduino. I have tried downloading several libraries found ...
-1
votes
1answer
640 views

AVR-STL Library

I have a project that I need to use a vector, I have tried to get several libraries to compile with out luck. The one that has gotten the closest is Andy Brown's AVR-STL. I keep getting the error: C:...