Class: Denko::AnalogIO::Potentiometer
- Defined in:
- lib/denko/analog_io/potentiometer.rb
Instance Attribute Summary
Attributes inherited from Input
#gain, #negative_pin, #sample_rate, #smoothing, #volts_per_bit
Attributes included from Behaviors::Listener
Attributes included from Behaviors::Callbacks
Attributes included from Behaviors::Threaded
Attributes included from Behaviors::SinglePin
Attributes included from Behaviors::Component
Instance Method Summary collapse
Methods inherited from Input
#_listen, #_read, #before_initialize, #on_change, #pre_callback_filter, #smooth_input
Methods included from Behaviors::Listener
Methods included from Behaviors::Callbacks
#add_callback, #callbacks, #initialize, #pre_callback_filter, #remove_callback, #update
Methods included from Behaviors::State
Methods included from Behaviors::Poller
Methods included from Behaviors::Threaded
#enable_interrupts, included, #stop, #stop_thread, #threaded, #threaded_loop
Methods included from Behaviors::Reader
#_read, #read, #read_using, #wait_for_read
Methods included from Behaviors::InputPin
Methods included from Behaviors::Component
Instance Method Details
#after_initialize(options = {}) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/denko/analog_io/potentiometer.rb', line 4 def after_initialize(={}) super() # Enable smoothing. self.smoothing = true # Start listening immediately. Read 2x as often as regular Input. listen(@divider = 8) end |