MattIPv4 / MattIPv4/PyDMXControl
Node-RED Controller
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 143
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Description
Hi Matt.
I'm looking for way to control my DMX decoder using RS485 hat on Rpi. I'd love to control it in Node-RED environment.
Shield's manufacturer supplied a sample python code, sending a simple test string over RS485, and it works, but I'm wandering how can I modify this code, making it send DMX frames. Maybe you could give me some tips how to do it, because unfortunately, I don't know python.
Here is the code which I've simplified a little bit, and original one in the link below.
import serial
import os
import sys
import logging
logging.basicConfig(level=logging.INFO)
libdir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(file))), 'lib')
if os.path.exists(libdir):
sys.path.append(libdir)
import RPi.GPIO as GPIO
import time
from waveshare_2_CH_RS485_HAT import config
TXDEN_1 = 27
TXDEN_2 = 22
ser = config.config(dev = "/dev/ttySC0")
data = ''
GPIO.output(TXDEN_1, GPIO.LOW)
ser.Uart_SendString('Waveshare 2-CH RS485 HAT\r\n')
time.sleep(0.005)#Waiting to send
GPIO.output(TXDEN_1, GPIO.HIGH)
https://www.waveshare.com/wiki/2-CH_RS485_HAT
Regards,
Paweł
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue provides a Python example using RPi.GPIO, serial, and waveshare_2_CH_RS485_HAT.config with /dev/ttySC0; start by reading that snippet and the linked Waveshare wiki. Clarify the intended Node-RED integration and DMX-frame requirements before choosing an entry point. Done should be a documented or tested way to send DMX frames through the RS485 HAT from Node-RED.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100