Giter VIP home page Giter VIP logo

dmxreceiver's Introduction

DmxReceiver

This is a small Arduino library for receiving DMX512 signals.

It is based on dmx_serial_sender, I basically just wrapped a class around the code of this sketch to make it usable in an easy and clean way.

You need to connect a DMX receiver (e.g. MAX485) to a pin of your Arduino to use this library.

Tested with Arduino Nano (ATmega328P), but it should also work with other boards using the same microcontroller.

Example code

#include <DmxReceiver.h>

/* Define the pin where the DMX receiver is connected: */
const byte pinDmx = 6;
/* Define the number of channels we want to receive: */
const byte channels = 3;
/* NOTE: Currently this means we will receive data on
         the first three channels, an option to define
         a channel offset is planned. */

DmxReceiver dmx(pinDmx, channels);

void setup() {
  /* Do your setup ... */
}

void loop() {
  /* Check for new DMX data: */
  if (dmx.poll()) {
    byte channel0 = dmx.getValue(0);
    byte channel1 = dmx.getValue(1);
    byte channel2 = dmx.getValue(2);
    /* Do things with the data we just received ... */
  }
}

dmxreceiver's People

Contributors

rookies avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dmxreceiver's Issues

Value is not stable and start on 128

When i print my first value, if my dmx send 0, it will be print 128, when I raise my slider, it varies between 2 values, it's not stable :/
I'm on an arduino leonardo, is that the reason? sorry for my bad english, i'm french :)

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.