Open Myrinero opened 1 month ago
Hi !
Well indeed there was an issue with the code extracting the artnet frame in the received packet. Most of them were falsely marked as invalid. I fixed it on my local repo but forgot to push it on github. It is now updated on the repo. Unfortunately I don't have a proper DMX light anymore to check it's working as expected but from the few tests I did it seems that, with using a single universe, the dmx channel is sent on uart 1 (TX2).
I left some commented code in the main whose purpose is to fill channel on universe 0 with some arbitrary values, you can uncomment it to see if your dmx device is receiving it (you can leave the wifi part aside, dmx task will send fixtures as long as its buffer isn't empty)
Thank you for the fast reply. :)
I've uploaded the latest repo, but still no luck. Need to clarify that i don't have programming knowledge, but i can fallow the logic to a some degree. In the main.cpp there is that part that i think you suggest to "uncomment":
static void universe_command(char* line)
{
uint16_t output, universe;
skip_space(&line);
if (parse_int(&line, &universe, ' '))
ESP_LOGE(TAG, "Invalid format for universe, try: universe [nbr] [1::2(dmx_output)]");
skip_space(&line);
if (parse_int(&line, &output, '\0'))
ESP_LOGE(TAG, "Invalid format for output, try: universe [nbr] [1::2(dmx_output)]");
if (output > DMX_OUTPUT_NBR || output < 1)
ESP_LOGE(TAG, "Output is invalid, it must be between 1 and %d. "\
"Update output nbr in Dmx.hpp to have more than 1 output", DMX_OUTPUT_NBR);
Artnet::universeMap[output] = universe;
}
When i try to remove it, some part of the code goes redlining. Is it the right one?
I was talking about this part in main.cpp file :
extern "C" void app_main() { (void) TAG;
Wifi::start(); UDPSocket::start();
Dmx::initialize(); Artnet::universeMap[0] = 0; UDPSocket::setHandler(Artnet::artnetToDmx); ///Handler should be set after universeMap has been configured // uint8_t buffer[9] = {255}; // Dmx::universes[0].setBuffer(buffer, 9); xTaskCreate(console_task, "consoleTask", configMINIMAL_STACK_SIZE + 10 + 1048, NULL, 10, NULL); }
These lines :
uint8_t buffer[9] = {255}; Dmx::universes[0].setBuffer(buffer, 9);
The idea is to fill the 9 first channels of universe 0 with the highest possible values. Try to run the firmware with those lines uncommented and see if your dmx device react. If it does then your issue must come from the way you are sending artnet data over wifi. If not then it's probably the way you hooked up everything, feel free to share a schematic with your connections. On the max-485, DIN should be connected with GPIO2 (D2) and DE should be connected to VCC. RE and RO are not needed.
Still no success.
I've noticed that the default built environment is esp32doit-devkit-v1 and i'm trying on the v4 and and wroom type-c. Still compile without errors and connect to my wifi, but maybe there is something different. When i try to change it esp32dev env it cannot compile. Not sure if i need to modify it more that in the platformio file.
Wiring is exactly the same as mentioned above.
Ok, I don't have other solutions to suggest at the moment, I'll take a look and do some tests again as soon as I find the time.
Hello there,
Upload is successful, but there is no output after the max485. I've tried two different types of max485 boards and the result is the same. For comparison, wled outputs dmx fine. The max485 boards that i have, there is an signal indicator led and it lights up when there is connection to pin 2 and 4. Any ideas?