Coder Social home page Coder Social logo

xilef12000 / ws2812-over-artnet Goto Github PK

View Code? Open in Web Editor NEW
14.0 1.0 3.0 188 KB

ws2812 over artnet with a raspberrypi

Home Page: https://www.xilef12000.com/project/6497/

License: MIT License

Python 75.71% Shell 24.29%
artnet artnet-dmx-receiver raspberry-pi ws2812 stage-lighting python python3 raspberry artnet-dmx artnet-node

ws2812-over-artnet's Introduction

ws2812-over-artnet

ws2812 over artnet with a raspberrypi

Note: The Documentation is unfinished and still in work.

Setup:

  1. Flash your SD-Card for the Raspberry-pi.
    I recommend using the Raspberry Pi Imager.
    You can use the Raspberrypy pi os lite, because there is no need for a gui.
    I used the Version "Raspberry Pi OS Lite (32-bit) Debian Bullseye"
    By pressing Crtl + Shift + X you get a options menu, in which you can set the host-name and enable ssh.
    (of course you can also use balena etcher, and create a ssh-file)

  2. Connect the ws2812-Strip to the raspberry pi.
    This is a very simple way to connect the ws2821-Strip:
    image

    ws2821-LED-Strip Raspberry-pi
    GND GND (e.g. pin14)
    Din GPIO 18 (pwm) (i.e. pin12)
    5V +3,3 V (e.g. pin1)

    But this method may not work for long strips, for other connection methods see this article by Tony DiCola from Adafruit.

  3. This is an optional step to improve the communication with the ws2812 LED-Strip
    (This step is not necessary, and can also be done later)

    1. open the file:
      sudo nano /etc/modprobe.d/snd-blacklist.conf
    2. and add:
      blacklist snd_bcm2835
      
      save and exit with Ctrl + O and Enter, and the Ctrl + X
    3. open the next file:
      sudo nano /boot/config.txt
    4. and change:
      # Enable audio (loads snd_bcm2835)
      dtparam=audio=on
      
      to:
      # Enable audio (loads snd_bcm2835)
      #dtparam=audio=on
      
      save and exit with Ctrl + O and Enter, and the Ctrl + X
    5. reboot the Raspberry pi using:
      sudo reboot
  4. Installing ws-2812-over-artnet
    download the script:

    Needs to be updated

    make the file executable and run it with sudo privileges:

    chmod u+x installws2812-over-artnet.sh
    sudo ./installws2812-over-artnet.sh

    (for a manual installation go here)

  5. Change the settings:
    open the config.json file:

    sudo nano config.json

    and set the desired Artnet Universe Id (artnet starts counting from 0)
    As well as the number of pixels used.

  6. Test the ws2812-Strip:

    sudo python3 ws2812.py

    (It is important to run the script with Root-privileges, so that it can access the pwm-function)
    The first LED should light up in red, and the last one in blue, all in between should light up in green.

    Debug:

    • If no LEDs lights up, but there is no error message in the shell, check the wiring
    • If the LEDs do not light up in the correct colour, but there is no error message in the shell, check the number of LEDs set in step 6 and/or do step 2.
    • If you get an error message check the sudo privileges, the number of LEDs set in step 6, and/or do step 2.
  7. Check the Artnet-Network:

    1. Setup your DMX software.
      (I used QLC+, for a tutorial how to set up QLC+ go here)
      If you need the IP-Address of the Raspberry pi use:

      hostname -I
    2. start the Artnet-test-script:

      sudo python3 artnet.py

      (Sudo must be used, because the library is installed in the Root-directory, to later function in combination with the ws2812-module)

    3. stop the script, by pressing any key

  8. Test the ws2818 over Artnet script:

    sudo python3 ws2812Artnet.py
    

    stop it with Ctrl + C (the script will then crash with an error message, which can be ignored)

  9. Setup the auto-startup of the script:
    will follow

  10. Setup a shutdown button:
    will follow

Additional Stuff:

QLC+ Artnet Setup:

will follow

manual installation:

  1. Update apt-get and install python3 and pip3:
    sudo apt-get update
    sudo apt-get install python3
    sudo apt-get install python3-pip
    confirm if necessary with y (yes)
  2. Install the following python modules:
    sudo pip3 install rpi_ws281x adafruit-circuitpython-neopixel
    sudo python3 -m pip install --force-reinstall adafruit-blinka
    sudo pip3 install stupidArtnet
    (And Yes, the libraries need to be installed in the Root-directory, more on that later)
  3. Copy the python files from the repo on your pi.

ws2812-over-artnet's People

Stargazers

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