Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of M300 (beeper support) that could be included in example-extras.cfg #847

Closed
ndupont-net opened this issue Nov 2, 2018 · 2 comments

Comments

@ndupont-net
Copy link
Contributor

ndupont-net commented Nov 2, 2018

Hi, here is how I have implemented the beeper using an output_pin and a gcode macro.

This could be added to example-extras.cfg as it would make for a great drag and drop snippet in custom configurations.

M300 [P] [S], although the frequency is not pitch-perfect, based on 1kHz and cannot be higher than that with this pwm cycle_time.

[output_pin BEEPER_pin]
pin: ar37
pwm: True
value: 0
shutdown_value: 0
cycle_time: 0.001
scale: 1000

[gcode_macro M300]
default_parameter_S=1000
default_parameter_P=100
gcode:  SET_PIN PIN=BEEPER_pin VALUE={S}
        G4 P{P}
        SET_PIN PIN=BEEPER_pin VALUE=0

My apologies if this is not the desired way to propose new functionnalities.

I also have a Tevo Tarantula config file that could be shared in the examples, and the implementation of M355 for case light control.

@KevinOConnor
Copy link
Collaborator

FYI, in issue #787 there was a discussion on possibly adding a "config/sample-macros.cfg" file for things like the above.

-Kevin

@ndupont-net
Copy link
Contributor Author

That sounds like a good place for it, issue closed then

Nicolas

@github-actions github-actions bot locked and limited conversation to collaborators Dec 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants