DmxSimple
DmxSimple copied to clipboard
RAMEND not defined for some Teensy's, limits DMXSimple to 128 channels
Description
RAMEND defined constant is not defined for at least some Teensy models (for example 3.2) yet the DMXSimple depends on it. When it's undefined, DMXSimple is limited to 128 DMX channels.
Describe your problem.
DMXSimple.h:
#if RAMEND <= 0x4FF
#define DMX_SIZE 128
#else
#define DMX_SIZE 512
#endif
When RAMEND is undefined, the C preprocessor treats it as zero. So for MCUs that don't define RAMEND, DMXSimple limits output to 128 channels.
Steps To Reproduce Problem
- Compile the SerialToDMX example for Teensy 3.2
- Run the code
- Attempt to set values for and send to DMX addresses above 128. The recipients above 128 don't receive data, don't update their brightness.
Hardware & Software
Board Teensy 3 Shields / modules used: Some level translator for RS485 in order to communicate with a lighting fixture. Arduino IDE version 1.8.19 Teensyduino version (if using Teensy): 2022-06-18 Version info & package name (from Tools > Boards > Board Manager) ??? Operating system & version Windows 10 recent Any other software or hardware?
Arduino Sketch
SerialToDMX example.
Errors or Incorrect Output
DMX output doesn't work above channel 128