this way the Arduino/Elegoo skills are capsulated.Code:#include "LivinGrimoireLight.h" Chobit* c1 = new Chobit(); // global var void setup() { Led led1(6); // used to initialize the Hello World skill Skill* s2 = new DiHelloWorld(led1); // example skill created Skill* s3 = new DiTemperature(0); // LM35 connected to analog pin #0 c1->addSkill(s2); c1->addSkill(s3); } void loop() { c1->think(0, 0, 0); }
less code in the void method.
I can swap skills instead of tinker with code
avoid code debt.
can collaborate using skills other people made