void setup(){
// "test mytest;" compiles ok, next statement now error:
// conversion from 'test*' to non-scalar type 'test' requested
test mytest = new test();
}
// no new today .. thanks to mr mem from arduino forum
test atest1 = test();
test atest2 = test();
//rest is some testing to PC
void setup(){
Serial.begin(9600);
}
void loop(){
//small test seems to work allright
Serial.print("atest1.i : ");
atest1.addone();
Serial.println(atest1.i);
// does it work with 2 variables: yes
Serial.print("atest2.i : ");
atest2.addone();
atest2.addone();
// can you assign and read: yes
if (atest2.i >= 20) {atest2.i=1;}
Serial.println(atest2.i);