Code Monkey home page Code Monkey logo

klipper-neopixel's Introduction

Klipper NeoPixel Templates

Info

This is a collection of NeoPixel led templates for Klipper firmware. It uses the array of leds as a progress bar for different printer actions. The refresh rate is faster than delayed_gcode.

The template of NeoPixel is changed by a macro. This is very handy in case you want to change the template during start macro or during a print. For example in the start macro you could set the template for temperature during preheat and then change to the template for print progress or printer speed for the same NeoPixel.

Installation

  1. Assuming you have a working NeoPixel led

    [neopixel my_led]
    pin: PB9
    chain_count: 32
    
  2. Download / clone led_progress.cfg to your klipper_config folder

  3. Include this file in your printer.cfg

[include led_progress.cfg]

Use

NEOPIXEL_DISPLAY LED="led_name" TYPE=template_type MODE=template_mode

LED

Your led name from neopixel cfg section

TYPE

extruder_temp extruder temperature relative to target temperature (if is set) or to maxim temperature

bed_temp bed temperature relative to target temperature (if is set) or to maxim temperature

print_percent progress of current print

printer_speed current speed relative to maximum printer speed

MODE

glow all leds will fade from one color (or non) to an other color

progress the leds will light up one by one

You can combine any TYPE with any MODE.

Examples

NEOPIXEL_DISPLAY LED="my_led" TYPE=extruder_temp MODE=glow

This macro command will show the extruder temperature in glow mode.

NEOPIXEL_DISPLAY LED="my_led" TYPE=print_percent MODE=progress

This macro command will show print completion in progress mode.

NEOPIXEL_DISPLAY LED="my_led" TYPE=print_speed MODE=progress

This macro command will show print speed in progress mode.

klipper-neopixel's People

Contributors

digitalninja-ro avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

klipper-neopixel's Issues

Brightness?

Hello,

Any way to change the maximum brightness in the template or as a parameter?

Thanks.

Keep getting errors

Hello,
Thanks so much for taking the time to write this code and post it publicly.
If you dont mind, I was hoping you could help me. Whenever I set it up I get the error "Option 'neopixel_display led' is not valid in section 'gcode_macro led_change'"
Here is my LED section:
image

Here is my macro section:
image

If you can help me I'd really appreciate it. This is my first use of a new macro and so I'm trying to learn how to implement them myself.

how to cancel the progress?

Thanks for this great piece of software! I like it very much!
I want to know that how to cancel a started printing progress and turn off the leds?

Does not work with MKS MINI 12864 V3

Editing as i somehow got it to work with print progress, looked like too many gcode: headers. so this is now a simple question, when my print started the screen had a slight hint of green, now at 73% complete, it is getting to a bright green so i know print progress is working perfectly, my question is during heating shouldn't it go from blue to red and then the progress takes over?

Reversing order

Hi, Love the functionality.

BUT, I'm lucky enough to own a printer that came with neopixels, that were mounted starting from right to left.
This kinda screws up the progress bar running the opposite direction of "convention".

I have searched the internet dry and tried multiple solutions to reverse the "for" loop, but it always gives me an error when trying to load the cfg.
Is there a super easy way, that i just didn't find, to do this?

template issue

this is the code i send.
NEOPIXEL_DISPLAY LED=coolant_fan_ring TEMPLATE=led_extruder_temp

this is the response i get from klipper
Unknown command:"SET_LED_TEMPLATE"

what am i doing wrong lol?

CANCEL_PRINT issue

once cancel print is sent there is no way to clear the template. basically I am using the neopixels on the BTT mini12864 with this macro, once I cancel print the backlight then turns off so I need a way to clear the current template. everything else works correctly

Support Sections

Hi.

First off, fantastic work!

I'd like to suggest a new feature though: sections.

I have 3 x 16 LED Rings chained together. Klipper unfortunately doesn't let you create sections, i.e. something like:

[neopixel ring1]
pin: P1.23
chain_count: 0
chain_start: 16

[neopixel ring2]
pin: P1.23
chain_count: 16
chain_start: 16

[neopixel ring3]
pin: P1.23
chain_count: 32
chain_start: 16

But perhaps you could edit the script to support it?

Ideally I'd want each of the ring to represent print status, nozzle temperature and bed temperature. So I envision something like:

NEOPIXEL_DISPLAY LED="led_name" TYPE=extruder_temp MODE=progress LED_START=0 LED_Count=16
NEOPIXEL_DISPLAY LED="led_name" TYPE=bed_temp MODE=progress LED_START=16 LED_Count=16
NEOPIXEL_DISPLAY LED="led_name" TYPE=print_percent MODE=progress LED_START=32 LED_Count=16

Makes sense? Sounds doable?

Startup Error message

Hi,

I get the next error message when booting klippy:
'Section 'display_template led_extruder_temp_glow' is not a valid config section' (looks like it's referring to line 31 in the .cfg file

I uploaded the 'led_progress.cfg' file in the same directory as the printer.cfg is in. added the section to printer.cfg like i was supposed to.

Am I doing something wrong here?

Can't change LED type after print

Hello
I've install You Neopixel effects and it's works like a charm, except that I can't change this after end of print.
In start print macro I've put that code:
NEOPIXEL_DISPLAY LED="chamber_leds" TYPE=print_percent MODE=progress
And after that I can't change led light - not from g-code, not from Mainsail panel.
I would like to reset that and turn on only white led on present print :)

Octoprint Print Progress

Does the progress not properly work with octoprint? I have tried to implement the macro, the temperature progress does not work when printing through octoprint.

Brightness control while print_percent / progress

Hello,

is it possible to implement the brightness parameter into some of the types?
I would really want to be able to set the brightness (and even the color) in the print_percent / progress.
For the glow its almost clear, that such parameter would influence the color contrast. But on the progress it should be a option.

Thank you for your time and this great macro!

Error after restart

I followed the Doc instructions and after restart i get this error "Option '{% if mode' is not valid in section 'gcode_macro neopixel_display'"

Unknown LED error

Im just getting (Unknown LED error) pictures below showing both printer.cfg and led_progress.cfg
146162d02ebb83899e156d8ea446108d
c65ad17462fc5dcb7c01b4c2e68857db
.

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.