Class: LGPIO::Infrared
- Inherits:
-
HardwarePWM
- Object
- HardwarePWM
- LGPIO::Infrared
- Defined in:
- lib/lgpio/infrared.rb
Constant Summary
Constants inherited from HardwarePWM
HardwarePWM::NS_PER_S, HardwarePWM::NS_PER_US, HardwarePWM::SYS_FS_PWM_PATH
Instance Attribute Summary
Attributes inherited from HardwarePWM
#duty, #enabled, #period, #polarity
Instance Method Summary collapse
Methods inherited from HardwarePWM
#disable, #duty_path, #duty_percent, #duty_percent=, #duty_us=, #enable, #enable_path, #frequency, #frequency=, #initialize, #path, #period_path, #polarity_path, #tx_wave_ook
Constructor Details
This class inherits a constructor from LGPIO::HardwarePWM
Instance Method Details
#transmit(pulses, duty: 33.333) ⇒ Object
3 4 5 6 |
# File 'lib/lgpio/infrared.rb', line 3 def transmit(pulses, duty: 33.333) self.duty_percent = duty tx_wave_ook(duty_path, @duty.to_s, pulses) end |