I get an error when trying to use RGB.mirrorTo() that says
‘class RGBClass’ has no member named ‘mirrorTo’
I moved the particle electron from a proto board to a project box and decided that I want to see the breathing led so I want to mirror the D7 led as described in the particle docs. Can you tell me why Im getting the error?
This is the .ino file:
//#include "application.h"
int led = D7;
int sw = D0;
int state = LOW;
int laststate = LOW;
int count = 0;
int pinr = B1;
int ping = B2;
int pinb = B3;
void setup() {
pinMode(D0, INPUT_PULLDOWN);
pinMode(D7,OUTPUT);
pinMode(B1,OUTPUT);
pinMode(B2,OUTPUT);
pinMode(B3,OUTPUT);
Serial.begin(9600);
}
STARTUP(RGB.mirrorTo(pinr,ping,pinb));
void loop() {
if (digitalRead(D0) == HIGH) {
digitalWrite(D7,HIGH);
Particle.publish("Switch","CLOSED");
Serial.println("D0 = HIGH");
Serial.println(count);
Serial.println(state);
Serial.println(laststate);
count++;
delay(1000);
while (digitalRead(D0) == HIGH);
}
digitalWrite(D7,LOW);
Serial.println("LOW");
}