Class: Denko::PulseIO::Buzzer
- Inherits:
-
PWMOutput
- Object
- DigitalIO::Output
- PWMOutput
- Denko::PulseIO::Buzzer
- Includes:
- Behaviors::Lifecycle
- Defined in:
- lib/denko/pulse_io/buzzer.rb
Constant Summary
Constants included from Behaviors::Lifecycle
Behaviors::Lifecycle::CALLBACK_METHODS
Constants included from Behaviors::OutputPin
Behaviors::OutputPin::OUTPUT_MODES
Instance Attribute Summary
Attributes included from Behaviors::Threaded
Attributes included from Behaviors::State
Attributes included from Behaviors::SinglePin
Attributes included from Behaviors::Component
Instance Method Summary collapse
- #no_tone ⇒ Object (also: #stop, #off)
-
#tone(frequency, duration = nil) ⇒ Object
Duration is in mills.
Methods included from Behaviors::Lifecycle
Methods inherited from PWMOutput
#_frequency=, #_resolution=, #digital_write, #duty=, #frequency, #frequency=, #period, #pwm_disable, #pwm_enable, #pwm_enabled?, #pwm_high, #pwm_settings_hash, #pwm_write, #resolution, #resolution=
Methods inherited from DigitalIO::Output
#digital_write, #high, #high?, #low, #low?, #pre_callback_filter, #toggle
Methods included from Behaviors::Threaded
#enable_interrupts, included, #mruby_thread_check, #stop_thread, #threaded, #threaded_loop
Methods included from Behaviors::Callbacks
#add_callback, #callbacks, #pre_callback_filter, #remove_callback, #update
Methods included from Behaviors::State
Methods included from Behaviors::SinglePin
#convert_pins, #initialize_pins
Methods included from Behaviors::Component
Instance Method Details
#no_tone ⇒ Object Also known as: stop, off
19 20 21 |
# File 'lib/denko/pulse_io/buzzer.rb', line 19 def no_tone board.no_tone(pin) end |
#tone(frequency, duration = nil) ⇒ Object
Duration is in mills
15 16 17 |
# File 'lib/denko/pulse_io/buzzer.rb', line 15 def tone(frequency, duration=nil) board.tone(pin, frequency, duration) end |