x4code:
small question, this compiles both classes or only one?
thank you so much for your answers, really apreaciate
Let me add to what Delta_G said....
ANY code that isn't used is not compiled in. For example, you could have a sketch with dozens of functions, but if all you do is [b]Serial.print ("Hello");[/b] the compiler will see that all the other code isn't being used and won't compile any of it.
You can try it... make a small sketch that does 2 different things, then at first only do one thing and leave the other function unused, then build it and see what size it is. Then, use the second function and watch the program get larger.
x4code:
small question, this compiles both classes or only one?
AFAIK: everything in your project directory gets complied, but only things that are referenced from your setup() and loop() get linked into the resulting binary file. So, the answer to the question that you actually wanted to ask is "only one will wind up taking up space on your arduino".