Questions tagged [vector]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
191 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 ...
Mike's user avatar
  • 103
2 votes
1 answer
3k 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 (...
Duncan C's user avatar
  • 5,652
0 votes
3 answers
118 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, ...
Randy's user avatar
  • 387
0 votes
1 answer
367 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?
Dominic Teo's user avatar
1 vote
1 answer
994 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 ...
Dominic Teo's user avatar
1 vote
1 answer
83 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&...
LucasBN86's user avatar
1 vote
2 answers
739 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 ...
Ben Velt's user avatar
2 votes
2 answers
502 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 ...
Sam Hammamy's user avatar
0 votes
3 answers
3k 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 ...
Jack S.'s user avatar
5 votes
2 answers
11k 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 ...
Andy Braham's user avatar
0 votes
1 answer
834 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:...
Andy Braham's user avatar