Giter Site home page Giter Site logo

mqtt-dmx's Introduction

DMX485

Requirements

This script requires pyserial.

pip install --user pyserial

Installation

Install from pip:

pip install --user dmx485

Install from source:

python setup.py install

Hardware Compatibility

This should work with any FTDI RS485 dongle or any of the similar knock-offs.

FTDI to RS485 cheap dongle:

https://fr.aliexpress.com/item/USB-to-TTL-RS485-Serial-Converter-Adapter-FTDI-Module-FT232RL-SN75176-double-function-double/32771847720.html?spm=a2g0w.search0104.3.15.63586239S7KSon&ws_ab_test=searchweb0_0,searchweb201602_2_10065_10068_319_10892_317_10696_453_10084_454_10083_10618_10304_10307_10820_10821_538_537_10302_536_10843_10059_10884_10887_100031_321_322_10103,searchweb201603_51,ppcSwitch_0&algo_expid=6957aa39-4868-4f8d-ac7f-b10f610a4a24-2&algo_pvid=6957aa39-4868-4f8d-ac7f-b10f610a4a24

Hardware Example

https://stevenbreuls.com/2013/05/diy-usb-dmx-dongle-interface-for-under-10/

Usage

First create an instance of dmx.DMX_Serial(), then start the background thread. Once that is running the dongle will begin sending a full DMX universe. To change the value of a channel use set_data(). This function takes a bytes() object with 512 bytes, each representing a single DMX channel. It will be sent on the next DMX refresh.

import time
import dmx

sender = dmx.DMX_Serial()
sender.start()
for i in range(200):
    if i % 2:
        sender.set_data(bytes((255,)*512))
    else:
        sender.set_data(bytes((0,)*512))
    time.sleep(1)

mqtt-dmx's People

Contributors

bitbyt3r avatar dylwhich avatar nikitin-t avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.