mathertel / DMXSerial

An Arduino library for sending and receiving DMX packets.
BSD 3-Clause "New" or "Revised" License
337 stars 79 forks source link

DMXSerial and EncoderButton library #81

Closed alex27riva closed 1 year ago

alex27riva commented 1 year ago

Hi everyone, I wrote a sketch that uses an SSD1306 OLED display, a rotary encoder using the EncoderButton library and the DMXSerial library for receiving a DMX channel. The purpose of the sketch is for controlling a fog machine. Without the DMXSerial library my sketch works perfectly, but when I uncomment the following line, the rotary encoder stops working. DMXSerial.init(DMXReceiver);

Could there be a conflict between the various libraries used? What could it depend on?

I attach an example sketch, I also added an LED that blinks without delay to verify that the program doesn't crash (since I can't use the serial to debug).

The board I use is an Arduino Nano. dmxserial_issue-231005a.zip

alex27riva commented 1 year ago

I discovered that pin 2 (used by the encoder) is used also for DMXMODEPIN in DMXSerial.h, so I changed it to a different pin. Now it's working fine