We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This library doesn't work with MySensor lib, main.cpp.o (symbol from plugin): In function atexit': (.text+0x0): multiple definition of main'
main.cpp.o (symbol from plugin): In function
main'
Example code `#define MY_GATEWAY_SERIAL
#include <SPI.h> #include <MySensors.h> #include <Bounce2.h> #include <dimmable_light.h> #include <Wire.h> #include <PCF8574.h>
const int SYNC_PIN = 2; const int AC_PIN = 3;
DimmableLight light(AC_PIN);
int brightness = 0; int fadeAmount = 5;
byte dim1 = 0;
const int period = 1000;
void setup() { Serial.println(); Serial.println("Dimmable Light for Arduino: second example"); Serial.println();
Serial.begin(115200); DimmableLight::setSyncPin(SYNC_PIN); DimmableLight::begin(); }
void loop() { for (brightness = 0; brightness <= 100; brightness += fadeAmount) { dim1 = (int)(brightness / 100. * 255); Serial.println(dim1); light.setBrightness(dim1); delay(period); }
// Rozjasnianie for (brightness = 100; brightness >= 0; brightness -= fadeAmount) { dim1 = (int)(brightness / 100. * 255); Serial.println(dim1); light.setBrightness(dim1); delay(period); } } `
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This library doesn't work with MySensor lib,
main.cpp.o (symbol from plugin): In function
atexit':(.text+0x0): multiple definition of
main'
Example code
`#define MY_GATEWAY_SERIAL
#include <SPI.h>
#include <MySensors.h>
#include <Bounce2.h>
#include <dimmable_light.h>
#include <Wire.h>
#include <PCF8574.h>
const int SYNC_PIN = 2;
const int AC_PIN = 3;
DimmableLight light(AC_PIN);
int brightness = 0;
int fadeAmount = 5;
byte dim1 = 0;
const int period = 1000;
void setup() {
Serial.println();
Serial.println("Dimmable Light for Arduino: second example");
Serial.println();
Serial.begin(115200);
DimmableLight::setSyncPin(SYNC_PIN);
DimmableLight::begin();
}
void loop() {
for (brightness = 0; brightness <= 100; brightness += fadeAmount) {
dim1 = (int)(brightness / 100. * 255);
Serial.println(dim1);
light.setBrightness(dim1);
delay(period);
}
// Rozjasnianie
for (brightness = 100; brightness >= 0; brightness -= fadeAmount) {
dim1 = (int)(brightness / 100. * 255);
Serial.println(dim1);
light.setBrightness(dim1);
delay(period);
}
}
`
The text was updated successfully, but these errors were encountered: