Could someone help me make a very simple class?
Here is a simplified example. Notice the error the first time the object is used.
Thanks!
class myClass{
public:
int pin;
int value;
};
myClass c;
c.pin = D0; // error: 'c' does not name a type
c.value = 1;
void setup() {
pinMode(c.pin, OUTPUT)
}
void loop() {
digitalWrite(c.pin, c.value);
c.value = !c.value;
delay(1000);
}