Hi there,
First time poster here, so appreciate your patience; I have bought a DMX to LED shield, and a different ESP32 board (a LilyGo T-Display v1.1); Ultimately, I only want to use the DMX side, none of the LED driving side.
So I have been through both schematics ( https://cdn.sparkfun.com/assets/c/1/c/c/d/SparkFun_ESP32_Thing_Plus_DMX_to_LED_Shield.pdf and https://kreier.github.io/t-display/TTGO_T-Display_schematics.pdf ), and hooked up the following lines:
I took the example DMX Output Code, with nearly no alteration (just wrote some additional addresses, in order to drive more channels on a test DMX fixture I hooked up, and added the explicit pins for 485_RX (26) and 485_TX(27), and changed the used pin for 485_EN (25)):
/*
Writes DMX data to channel 1
By: Dryw Wade
SparkFun Electronics
Date: 10/3/2023
License: GNU. See license file for more information but you can
basically do whatever you want with this code.
This example runs two servos and a number of LED's off of 5 DMX channels
Feel like supporting open source hardware?
Buy a board from SparkFun! https://www.sparkfun.com/products/15110
Hardware Connections:
Connect a Thing Plus board to the SparkFun DMX Shield, and connect a DMX XLR-3
cable between the shield and another device that outputs DMX data. You can use
a second board and shield running Example 2!
*/
// Inlcude DMX library
#include <SparkFunDMX.h>
// Create DMX object
SparkFunDMX dmx;
// Create serial port to be used for DMX interface. Exact implementation depends
// on platform, this example is for the ESP32
HardwareSerial dmxSerial(2);
// Enable pin for DMX shield (Free pin on Thing Plus or Feather pinout)
**uint8_t enPin = 25;**
**uint8_t rxP = 26;**
**uint8_t txP = 27;**
// Number of DMX channels, can be up tp 512
**uint16_t numChannels = 5;**
// Create a counter as example data
uint8_t counter = 0;
void setup()
{
Serial.begin(115200);
Serial.println("SparkFun DMX Example 1 - Output");
// Begin DMX serial port
dmxSerial.begin(DMX_BAUD, DMX_FORMAT**,rxP,txP);**
// Begin DMX driver
dmx.begin(dmxSerial, enPin, numChannels);
// Set communicaiton direction, which can be changed on the fly as needed
dmx.setComDir(DMX_WRITE_DIR);
Serial.println("DMX initialized!");
}
void loop()
{
// Write counter to channel 1
dmx.writeByte(counter, 1);
** dmx.writeByte(counter, 2);**
** dmx.writeByte(counter, 3);**
** dmx.writeByte(counter, 4);**
** dmx.writeByte(counter, 5);**
// Once all data has been written, update() must be called to actually send it
dmx.update();
Serial.print("DMX: sent value to channel 1 thru 5: ");
Serial.println(counter);
// Increment counter (overflows back to 0 after 255)
counter++;
// Slow down communication for this example
delay(100);
}
I can compile and upload and execute the code, the serial monitor for UART0 works fine, and no errors are reported, but I don’t get any DMX output on the port (tested the fixture with another DMX controller and it works).
Arduino: 2.3.2
esp32 board def: 3.1.1
latest Sparkfun DMX library installed.
What am I doing wrong?
Thanks in advance for your help!
All the best,
Fzd