mathertel / DMXSerial

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

Does the library send and receive? #10

Closed mixographer closed 7 years ago

mixographer commented 7 years ago

I see the example code called DMXSerialFLow, and the init calls (DMXController), but I see this in the code:

typedef enum { DMXNone, // unspecified DMXController, // always sending DMXReceiver // always listening } DMXMode;

I'm trying to make a DMX tester that I could switch between sending DMX or receiving DMX. I'm also not sure that doing init(DMXController, 4) is working to switch pin 4 low when I set try to receive data. Does it only go low when the interrupt fires for receiving data?

Thanks for a great lib.

mathertel commented 7 years ago

Hi Jimmy,

a DMX tester will be a great project to build. You can use the library but I think you will have to change it to allow frequent sending and receiving. Please also check that there are NEVER multiple controllers on a DMX line. You will kill probably one or more.

My current work on DMXSerial enables receiving package by packet to allow integration of other time critical IO functions as they are required for neopixels.

You can find it on the latest feature branch on github: https://github.com/mathertel/DMXSerial/tree/feature/DMXProbe

This sample switches receiving on and off by enabling / disabling the interrupts. It only contains code for receiving yet …. So it’s working status, not final – but you can have a look at the new mode called DMXProbe. If you have any concrete project code – let us share and see..

mathertel commented 7 years ago

I just finished the Version 1.4 of the library including the DMXProbe mode and an example how to use it to read on DMX packet and then send the data to NeoPixels. I will update the docu on the modes at https://www.mathertel.de/Arduino/DMXSerial.aspx.

mixographer commented 7 years ago

Thanks for the info. I will check the other library. I solved the problem for the DMX Tester with a switch that allows me to reset the device by watchdog timer, and reads the switch position to start up in either send mode or receive mode. Thanks for the reply. I missed the one 8 days ago.