udmx

package module
v0.0.0-...-f4044f2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

README

udmx-go

A simple client library for the uDMX USB to DMX interface. Based on the C uDMX code on GitHub.

Example Usage

package main

import (
	"log"

	udmx "github.com/noddy76/udmx-go"
)

func main() {
	dmx, err := udmx.NewUdmx()
	if err != nil {
		log.Panicf("Error opening DMX : %v", err)
	}

	dmx.SetChannelRange(0, []byte{255, 255, 0, 0})

	err = dmx.Close()
	if err != nil {
		log.Panicf("Error closing DMX : %v", err)
	}
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Udmx

type Udmx struct {
	// contains filtered or unexported fields
}

func NewUdmx

func NewUdmx() (*Udmx, error)

func NewUdmxForId

func NewUdmxForId(vid, pid gousb.ID) (*Udmx, error)

func (*Udmx) Close

func (dmx *Udmx) Close() error

func (*Udmx) SetChannelRange

func (dmx *Udmx) SetChannelRange(channel uint8, values []uint8) error

func (*Udmx) SetSingleChannel

func (dmx *Udmx) SetSingleChannel(channel, value uint8) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL