Hello guys,
I'm kind of noob to C/C++ as well as embedded programming. So please excuse me if my questions are stupid or not relevant to this forum:
So one of the problems I have is that I'm struggling to draw line of what I can do with C++ for Arduino compiler, meaning for example I have certain problem at the moment and I know I can find answer by including C++ std libraries. But from what i understand, you can’t really do that, because then you will really quickly ran out of microcontroller memory or space. So first question would be is where should i ask questions about on how to write certain stuff specifically for Arduino compiler in C++, without annoying people?
I can't really ask them in C++ forum, because then they always advice to use functionality from standard libraries... And I'm not sure, if I can ask them here, because usually related to knowledge of C++ itself rather than to microcontroller...
Here are some examples of the questions I have:
-
I would like to have dynamic array/list... to which I can add/remove instances of the object, and which will only use memory depending on amount added items... I know here is "list" in std libraries of C++, but is it possible to achieve something similar in C/C++ for Arduino?
-
I have written class for scheduling some tasks depending on time parameters (similar to Timer/SimpleTimer), now the problem I found is that in C++ seems function is different thing to method, therefor my callback for function typedef void(*SchedulerTaskCallback)(void) is not same as callback for methods and I can not call it from another class, so i had to change it to typedef void(T::*SchedulerTaskCallback)(void), but then I cannot call it from main loop and call it as function, plus then I had to add "template " to my Scheduler class and that opens whole new can of worms. My question is there way to add callback to my Schuduler class, which can be used from both another class method and function from man loop? and not make my Schuduler class have template to type of another class?
I'm sorry, if my questions do not make sense, like I said I'm new to this.