Skip to content
New issue

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

Not working with MySensors #60

Open
nieMateusz opened this issue Apr 27, 2024 · 0 comments
Open

Not working with MySensors #60

nieMateusz opened this issue Apr 27, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@nieMateusz
Copy link

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);
}
}
`

  • Library version: everyone
  • Arduino core: 1.8.3
  • Enviroment/IDE: Arduino IDE
  • Dimmer board:
  • Board: nano
@nieMateusz nieMateusz added the bug Something isn't working label Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant