Coder Social home page Coder Social logo

dali_master's Introduction

dali_master

A Particle library for dali_master. Turns your Particle Photon into a DALI Master with the LED Warrior 14 modules available here:

About DALI

DALI (Digital Addressable Lighting Interface) is a method of controlling lighting fixtures via a 2 wire bus. The DALI interface communicates via Manchester encoding.

Up to 64 individual devices can be communicated with. Scenes and groups can be defined to group together multiple fixtures. More complicated builds use light and PIR sensors to turn lights on and off.

References:

This project

The code here is based largely around this original library: https://create.arduino.cc/projecthub/NabiyevTR/simple-dali-controller-506e44 which uses custom circuitry to interface with the DALI bus. I had no interest in designing my own circuit so I purchased a ready-made solution which uses I2C and galvanicly isolates the MCU from the DALI bus.

I've managed to reliably address 2 light features on the bus using the RANDOMISE command which was my main goal.

While the DALI reference is available as a paid for PDF, I used various resources online to understand the commissioning process.

References:

Usage

Connect the LED Warrior to your Photon. This library should be usable on an Arduino (see below).

  • D0 -> SDA
  • D1 -> SCL
  • GND -> GND
  • VIN -> 5V (for 14-01 only)

You'll need pullup resistors for each I2C line (SDA & SCL).

Add the dali_master library to your project and follow this simple example:

#include "dali_master.h"
Dali_master dali;

void setup() {
  dali.begin(0x28); // I2C address of LED Warrior
}

void loop() {
  // Turn all connected devices on and off (no short address required)
  dali.transmitCommand(BROADCAST_C, ON_C);
  delay(1000);
  dali.transmitCommand(BROADCAST_C, OFF_C);
  delay(1000);
}

See the examples folder for more details.

Using an Arduino

I developed this library on a Particle Photon which is a more powerful Arduino compatible device with WiFi and cloud connectivity built-in.

While I don't have an Arduino handy to test with, the likely change will be in the .h file:

// This will load the definition for common Particle variable types
#include "Particle.h"
#include "application.h"

Changes to:

#include "Arduino.h"

LICENSE

Copyright 2017 Steve Parker

Licensed under the Apache License Version 2.0 license

dali_master's People

Contributors

per1234 avatar sorx14 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dali_master's Issues

Broadcast dimming

how is it possible to send a broadcast command for dimming all the lights?

wire library missing , error compiling

error: 'Wire' was not declared in this scope byte1 = Wire.read();
error: 'Wire' was not declared in this scope Wire.reset();

please what wire library do you use, standard arduino wire.h has not for example wire.reset or wire.speed

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.