Skip to content

Instantly share code, notes, and snippets.

View shauneccles's full-sized avatar

Shaun Eccles-Smith shauneccles

  • Melbourne, Victoria
View GitHub Profile
{"status": "success", "presets": {"off": {"devices": {"output-1": {}, "output-2": {}, "output-3": {}, "output-6": {}, "output-8": {}}, "name": "Off"}, "pitch-spectrum-dancefloor": {"devices": {"output-1": {"config": {"blur": 1.0, "brightness": 1.0, "fade_rate": 0.2, "flip": true, "gradient_method": "bezier", "gradient_name": "Dancefloor", "gradient_roll": 1, "mirror": false, "responsiveness": 0.15}, "type": "pitchSpectrum(Reactive)"}, "output-2": {"config": {"blur": 1.0, "brightness": 1.0, "fade_rate": 0.2, "flip": true, "gradient_method": "bezier", "gradient_name": "Dancefloor", "gradient_roll": 1, "mirror": false, "responsiveness": 0.15}, "type": "pitchSpectrum(Reactive)"}, "output-3": {"config": {"blur": 1.0, "brightness": 1.0, "fade_rate": 0.2, "flip": true, "gradient_method": "bezier", "gradient_name": "Dancefloor", "gradient_roll": 1, "mirror": false, "responsiveness": 0.15}, "type": "pitchSpectrum(Reactive)"}, "output-6": {"config": {"blur": 1.0, "brightness": 1.0, "fade_rate": 0.2, "flip": true, "grad
@shauneccles
shauneccles / LedFX Dev Setup
Created April 6, 2020 15:23
How to setup and install the dev branch of ledfx
conda create -n ledfxdevelopment-git python=3.6
conda activate ledfxdevelopment-git
conda config --add channels conda-forge
conda install pywin32 portaudio
cd %HOMEPATH%
mkdir ledfx_dev_branch
git clone https://github.com/ahodges9/LedFx.git -b dev ledfx_dev_branch
cd ledfx_dev_branch
pip install -r requirements.txt
python setup.py develop
; example2.nsi
;
; This script is based on example1.nsi, but it remember the directory,
; has uninstall support and (optionally) installs start menu shortcuts.
;
; It will install example2.nsi into a directory that the user selects.
;
; See install-shared.nsi for a more robust way of checking for administrator rights.
; See install-per-user.nsi for a file association example.
; example2.nsi
;
; This script is based on example1.nsi, but it remember the directory,
; has uninstall support and (optionally) installs start menu shortcuts.
;
; It will install example2.nsi into a directory that the user selects.
;
; See install-shared.nsi for a more robust way of checking for administrator rights.
; See install-per-user.nsi for a file association example.
pyinstaller --noconfirm --console -i discord_ledfx.ico --onedir --hidden-import "sacn" --hidden-import "pyaudio" --hidden-import "portaudio" --hidden-import "aubio" --hidden-import "numpy" --hidden-import "math" --hidden-import "voluptuous" --hidden-import "numpy" --path "C:\Users\shaun\Anaconda3\pkgs\*" --add-data "C:/ledfx_dev_branch/ledfx_frontend;ledfx_frontend/" --add-data "C:/ledfx_dev_branch/ledfx;ledfx/" "C:/ledfx_dev_branch/ledfx/__main__.py"
pyinstaller --noconfirm --console -i discord_ledfx.ico --onedir --paths "C:/Users/shaun/ledfx-env/" --hidden-import sacn --hidden-import pyaudio --hidden-import aubio --hidden-import numpy --hidden-import math --hidden-import voluptuous --hidden-import numpy --hidden-import aiohttp --hidden-import aiohttp_jinja2 --add-data "C:/Users/shaun/ledfx-env/LedFx/ledfx_frontend;ledfx_frontend/" --add-data "C:/Users/shaun/ledfx-env/LedFx/ledfx;ledfx/" "C:/Users/shaun/ledfx-env/LedFx/ledfx/__main__.py"
@shauneccles
shauneccles / install.sh
Last active November 15, 2020 20:16
LedFx Linux Install Instructions
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install libportaudio2 libportaudiocpp0 portaudio19-dev libsndfile1-dev build-essential -y
git clone https://github.com/ahodges9/LedFx.git -b dev ~/LedFx
pip install -r ~/LedFx/requirements.txt
python ~/LedFx/setup.py build
python ~/LedFx/setup.py install
ledfx --open-ui
_mDNS_IP = None
class mDNSResolver:
## mDNS Based Resolver
def remove_service(self, zeroconf_obj, type, name):
_LOGGER.info(f"Service {name} removed")
def add_service(self, zeroconf, type, name):
mdnsdata = zeroconf.get_service_info(type, name)
; Preamble
M420 S1 ; restore abl mesh
M201 X500.00 Y500.00 Z100.00 E5000.00 ;Setup machine max acceleration
M203 X500.00 Y500.00 Z10.00 E50.00 ;Setup machine max feedrate
M204 P500.00 R1000.00 T500.00 ;Setup Print/Retract/Travel acceleration
M205 X8.00 Y8.00 Z0.40 E5.00 ;Setup Jerk
M220 S100 ;Reset Feedrate
M221 S100 ;Reset Flowrate
; Heat nozzle just enough to accurately home without drooping
[ERROR ] ledfx.core : Exception in core event loop: Exception in callback Display.thread_function()
Traceback (most recent call last):
File "C:\Users\shaun\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "c:\users\shaun\ledfx_venv_3.9\ledfx\ledfx\displays.py", line 312, in thread_function
self.process_active_effect()
File "c:\users\shaun\ledfx_venv_3.9\ledfx\ledfx\displays.py", line 293, in process_active_effect
self.assembled_frame = self.assemble_frame()
File "c:\users\shaun\ledfx_venv_3.9\ledfx\ledfx\displays.py", line 355, in assemble_frame
self.frame_transitions(