Skip to content

Latest commit

 

History

History
55 lines (35 loc) · 2.34 KB

README.md

File metadata and controls

55 lines (35 loc) · 2.34 KB

alt text

PYLedX

52Pi ZP-0128 ABSMiniTowerKit Ice Tower LED Fans Custom Color Python Script

Installation guide:


  1. Make sure you followed all steps in https://wiki.52pi.com/index.php?title=ZP-0128 to make it work first

  2. Run "sudo pip install rpi_ws281x"

  3. Place the pyledx.py file on a directory you'll remember, we'll use the following path

     /home/surce/pyledx.py
    
  4. Disable minitower_moodlight.service by using the following command

     sudo systemctl disable minitower_moodlight.service
    
  5. STOP minitower_moodlight.service by using the following command

     sudo systemctl stop minitower_moodlight.service
    
  6. Test the pyledx.py script by running the following command

     sudo python3 pyledx.py -c --test
    
  7. Confirm it's working

  8. Find a color option which suits your needs by looking at the help dialog by typing

     sudo python3 pyledx.py -h
    
     *Make sure you've stopped the minitower_moodlight.service before playing with
     the script or it may throw buggy results in the leds and could eventually freeze or hang them
     until next restart, if you've experienced this issue then reboot and start again
    
  9. Modify the ExecStart from service minitower_moodlight.service

     sudo nano /lib/systemd/system/minitower_moodlight.service
    
  10. Comment the line ExecStart=sudo /usr/bin/moodlight & with an # before ExecStart, like this #ExecStart

  11. Add the following ExecStart instead

    ExecStart=/bin/bash -c '/usr/bin/python3 /home/surce/pyledx.py -c --cyan &'
    
  12. Enable minitower_moodlight.service by using the following command

     sudo systemctl enable minitower_moodlight.service
    
  13. Reboot to confirm it's working and enjoy!

  • You can also play with ExecStart by using:

        ExecStart=/bin/bash -c '/usr/bin/python3 /home/surce/pyledx.py -c --purple &'
    
        ExecStart=/bin/bash -c '/usr/bin/python3 /home/surce/pyledx.py -c --white &'
    
        ExecStart=/bin/bash -c '/usr/bin/python3 /home/surce/pyledx.py -c --purple --pulsate --pulsatevelocity 0.5 &'
    
        ExecStart=/bin/bash -c '/usr/bin/python3 /home/surce/pyledx.py -c --complex_universe &'
    
        ExecStart=/bin/bash -c '/usr/bin/python3 /home/surce/pyledx.py -c --complex_hellsgate &'