Distinguish between BUZZER and SPEAKER (PR#2513)
A speaker needs a AC or a pulsed DC to make a sound, a buzzer only needs a DC. A buzzer has it's own resonator. It works in most cases to feed the buzzer with a pulsed DC, but the sound will not be as loud as with pure DC. There seem to be boards where the BEEPER-pin is not able to handle a PWM. Obviously intended for a buzzer. To make these board able to handle a speaker * replace the PWM based tone()-function again with a on-delay-off-delay loop. Hopefully the last time I touch the beeper code.
This commit is contained in:
		
				
					committed by
					
						 Richard Wackerbarth
						Richard Wackerbarth
					
				
			
			
				
	
			
			
			
						parent
						
							53d9c9ff23
						
					
				
				
					commit
					fd0e81b0c7
				
			| @@ -650,6 +650,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic | ||||
| //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking | ||||
| //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store. | ||||
| //#define ULTIPANEL  //the UltiPanel as on Thingiverse | ||||
| //#define SPEAKER // The sound device is a speaker - not a buzzer. A buzzer resonates with his own frequency. | ||||
| //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click | ||||
| //#define LCD_FEEDBACK_FREQUENCY_HZ 1000         // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click | ||||
|                                                  // 0 to disable buzzer feedback. Test with M300 S<frequency Hz> P<duration ms> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user