claudeheintz / LXESP8266DMX

DMX Driver for ESP8266 using ArduinoIDE
BSD 3-Clause "New" or "Revised" License
31 stars 9 forks source link

Getting serial debug print working #6

Open geniusled opened 3 years ago

geniusled commented 3 years ago

Hello, i have been playing with this library while trying to make a RDM device+dmx inputneopixel following the examples and adding rdm functions calls (device info ,product category , etc) and have partial working project but need to troubleshoot(cant assign dmx address over 225 via lighting console rdm commands)

i see in the setup "Serial.setDebugOutput(1); //use uart0 for debugging"
but cant seem to find a way to get serial prints to work, i have also defined: LXESP8266UARTDMX_DEBUG but that doesnt seem to change anything is there a special trick i dont know?

Thanks for the amazingly put library btw!

claudeheintz commented 3 years ago

Getting Serial to work with the library can be an issue depending on which of the ESP8266's pins are available on the board you are using. The original code was developed for the Adafruit ESP8266 Huzzah which only had 3 UART pins exposed. So, bidirectional DMX and Serial for debugging was not possible.

Serial.setDebugOutput(1) sets the ESP8266's debug output to UART 1 or 0. This does not have anything to do with Serial. This is the ESP8266's own debugging/error messages. You want to direct those away from your DMX UART so you don't get debug messages going out the DMX line.

Unfortunately, debugging RDM can involve a logic probe to examine the serial line itself. You may need to look at that to see what the console is sending with the RDM set address message. The example RDMDeviceTest.ino shows how the address is divided into two bytes in the RDM message (line 168...)

geniusled commented 3 years ago

Thank you for the response, i do have a logic analyzer i will pull out thank you for the suggestion. i was thinking about using 2 esp and one dedicated only to listening and debug prints, a logic probe is better.

my lighting software can change the address successfully(1-512) when i send a "manual RDM message" "set address" with a hex value. but it can also set the address with a more "normal" method in regular decimal value(1-512), which only works up to 225 and only started working once i added the Get "device info" RDM command. i suspect something that is 8 bit needs to be 16 but need to spend more time looking at it.