Is it possible that the object is not being cleaned up or something, even through it's declared within the scope of a function? Or, would the Servo objects in the library not be cleaned up??
Slow down a bit. Do your thinking in your own time and post your comments when you have the thinking complete.
Your code suggests a very poor knowledge of programming before I make any attempt to look at your library.
Why would you bother to have a while(true) inside loop() when that is what loop() is there for.
And the Arduino can do nothing while a delay() is in progress
And why would you even think of creating instances of your library anywhere except in setup() - where they are just created once.
And please use the code button </> so your code looks like this
Robin2:
Slow down a bit. Do your thinking in your own time and post your comments when you have the thinking complete.
Your code suggests a very poor knowledge of programming before I make any attempt to look at your library.
Why would you bother to have a while(true) inside loop() when that is what loop() is there for.
And the Arduino can do nothing while a delay() is in progress
And why would you even think of creating instances of your library anywhere except in setup() - where they are just created once.
And please use the code button </>
so your code looks like this
...R
Wow. Please don't bother looking at my code - your "help" is just criticism and cynicism which you clearly get some kind of satisfaction from - i.e. you're a troll.
P.S. That code I posted was just a bare bones basic example that I put together to demonstrate when the issue occurs and when it doesn't. The while(true) is there so the RemoteLib object is instantiated just once (to demonstrate that it works fine in that situation)
P.P.S. "Do your thinking in your own time ..." wtf? I didn't know I was your employee lol
mikgol:
Wow. Please don't bother looking at my code - your "help" is just criticism and cynicism which you clearly get some kind of satisfaction from - i.e. you're a troll.
P.S. That code I posted was just a bare bones basic example that I put together to demonstrate when the issue occurs and when it doesn't. The while(true) is there so the RemoteLib object is instantiated just once (to demonstrate that it works fine in that situation)
P.P.S. "Do your thinking in your own time ..." wtf? I didn't know I was your employee lol
If you cannot take criticism, don't ask questions.
Thicken your Skin.
As Robin2 said: Slow Down. Ask a question, expect responses.
Robin2:
Slow down a bit. Do your thinking in your own time and post your comments when you have the thinking complete.
When you ask a chain of questions it seems you really don't want an answer, you just want to vent.
like:
What if I do this? (insert question here>)
But what if I do this? (insert different question here>)
But I really want to do it this way? (insert example of non working code here>)
And when someone calls out 'bad coding' practices you call them a troll. a troll is someone that calls out mistakes to belittle a poster. Robin2 has valid critiques. The Arduino environment calls the loop() function continously. But every time around the loop() it can do some house keeping. when you put that:
void loop(){
while(true){
//stay here fore ever!
}
}
Some of the Arduino environment will not funtion as expected.
also, the setup() function is by definition called only once after reset, all of your one time initialization code should be called from it.
Chuck.
p.s. no one called you stupid(incapable of learning), you are ignorant (lacking knowledge) get over it and learn.