#include <mole.h>
mole mole1 = new mole( 2, 8 );
mole mole2 = new mole( 3, 9 );
mole mole3 = new mole( 4, 10 );
mole mole4 = new mole( 5, 11 );
mole mole5 = new mole( 6, 12 );
mole mole6 = new mole( 7, 13 );
//I would also like a array of moles here so I can do something like this.
//moleArray[0].sould_be_up = true;
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
When your constructor is called, the hardware is not ready to be diddled with, so quit diddling with the hardware in the constructor.
Put another way the only thing you can do in a constructor that is called from top-level is set the value of
variables. Top level expressions happen first as the program is initialized, so no machinery from the
Arduino environment is guaranteed to work, not even new I think.
Where did you get the library mole? I made it ╭∩╮(-_-)╭∩╮,I did not want it to be a library I just wanted it to be a class that I can make instances of.
What IDE version are you using? 1.6.12
What model Arduino are you using? should not madder but the Arduino/Genuino Uno chip mega328u