Closed maincraft-io closed 2 years ago
Your example is leaking memory, set it like this and you'll be fine
LinkedList<byte> * packet;
void setup()
{
packet = new LinkedList<byte>();
}
void loop()
{
if(testTimer > 50) {
packet->add(0xF1);
// etc...
}
}
Your example is leaking memory, set it like this and you'll be fine
LinkedList<byte> * packet; void setup() { packet = new LinkedList<byte>(); } void loop() { if(testTimer > 50) { packet->add(0xF1); // etc... } }
Amazing! Thanks for fastest reply and help. Very appricate for idea.
Simple code below doing auto-reboot of Arduino: