add function that gets called before homie initialization
This commit is contained in:
@@ -28,3 +28,17 @@ Device* devices[] = {
|
||||
&deviceLedW2,
|
||||
&deviceRgb,
|
||||
};
|
||||
|
||||
void hardwareSetup() {
|
||||
pinMode(PIN_LED1, OUTPUT);
|
||||
pinMode(PIN_LED2, OUTPUT);
|
||||
pinMode(PIN_RGB_RED, OUTPUT);
|
||||
pinMode(PIN_RGB_GREEN, OUTPUT);
|
||||
pinMode(PIN_RGB_BLUE, OUTPUT);
|
||||
analogWrite(PIN_LED1, 100);
|
||||
analogWrite(PIN_LED2, 0);
|
||||
analogWrite(PIN_RGB_RED, 0);
|
||||
analogWrite(PIN_RGB_GREEN, 0);
|
||||
analogWrite(PIN_RGB_BLUE, 0);
|
||||
deviceLedW1.ledBrightnessHandler("{\"brightness\":100}");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user