Giter VIP home page Giter VIP logo

cdmxdriver's Introduction

cDMXdriver

Driver to use a serial port on linux to output a dmx-signal

About

Hardware

Use the TX pin of your serial port or usb to serial adapter (e.g. CP2102 or FT232RL) as a input for a RS485 transmitter (e.g.MAX485). Connect the output of the RS485 transmitter to your DMX device.

example for MAX485:

  • Pin 3, 8 at Vcc = 5V
  • Pin 2, 8 at GND
  • Pin 1 over 120Ohm at GND
  • Pin 4 TX as input signal
  • Pin 6 as DMX HOT (+)
  • Pin 7 as DMX COLD (-)

Functions

  • struct dmxPort: A struct in which all important data is stored. It is stored in shared memory.
  • initDMXPort(port): The function to generate a dmxPort struct (as shared memory). It configures the serial port, initializes the variables and returns a pointer to the generated dmx Port. The parameter specifies the port e.g. "/dev/ttyUSB0".
  • setMaxDMXChannel(dmx, maxChannel): Set the highest send DMX channel. You should use this to get a higher output frequency cf. img/.
  • setDMXChannel(dmx, channel, value): Set a channel (1-512) to a value (0-255).
  • getDMXChannel(dmx, channel): Get a channel (1-512).
  • getDMXOutputPointer(dmx): Get a pointer to the output array. Channels from 0 to 511.
  • startDMXOutput(dmx): Start sending the dmx signal (makes a fork and call 'dmxThreadFunction').
  • stopDMXOutput(dmx): Stops the active output.
  • closeDMXPort(dmx): Stops sending signals and closes the serial port.

Notes

  • I used a CP2102 USB to TTL adapter with MAX485 to test the software successfully.
  • Look in the img folder for oszi images.
  • There are some ohter usefull functions. Take a look at cDMXdriver.h.

cdmxdriver's People

Contributors

robotlem avatar

Watchers

 avatar  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.