Class: Pigpio::Wave

Inherits:
Object
  • Object
show all
Defined in:
lib/pigpio/wave.rb

Instance Method Summary collapse

Constructor Details

#initialize(pi) ⇒ Wave

Returns a new instance of Wave.



3
4
5
6
# File 'lib/pigpio/wave.rb', line 3

def initialize(pi)
  @pi = pi
  IF.wave_clear(pi)
end

Instance Method Details

#add_generic(pulses) ⇒ Object



16
17
18
# File 'lib/pigpio/wave.rb', line 16

def add_generic(pulses)
  IF.wave_add_generic(@pi, pulses)
end

#add_newObject



12
13
14
# File 'lib/pigpio/wave.rb', line 12

def add_new
  IF.wave_add_new(@pi)
end

#add_serial(user_gpio, baud, data_bits, stop_bits, offset, str) ⇒ Object



20
21
22
# File 'lib/pigpio/wave.rb', line 20

def add_serial(user_gpio, baud, data_bits, stop_bits, offset, str)
  IF.wave_add_serial(@pi, user_gpio, baud, data_bits, stop_bits, offset, str)
end

#cbsObject



84
85
86
# File 'lib/pigpio/wave.rb', line 84

def cbs
  IF.wave_get_cbs(@pi)
end

#chain(buf) ⇒ Object



44
45
46
# File 'lib/pigpio/wave.rb', line 44

def chain(buf)
  IF.wave_chain(@pi, buf)
end

#clearObject



8
9
10
# File 'lib/pigpio/wave.rb', line 8

def clear
  IF.wave_clear(@pi)
end

#createObject



24
25
26
# File 'lib/pigpio/wave.rb', line 24

def create
  IF.wave_create(@pi)
end

#delete(id) ⇒ Object



28
29
30
# File 'lib/pigpio/wave.rb', line 28

def delete(id)
  IF.wave_delete(@pi, id)
end

#high_cbsObject



88
89
90
# File 'lib/pigpio/wave.rb', line 88

def high_cbs
  IF.wave_get_high_cbs(@pi)
end

#high_microsObject



64
65
66
# File 'lib/pigpio/wave.rb', line 64

def high_micros
  IF.wave_get_high_micros(@pi)
end

#high_pulsesObject



76
77
78
# File 'lib/pigpio/wave.rb', line 76

def high_pulses
  IF.wave_get_high_pulses(@pi)
end

#max_cbsObject



92
93
94
# File 'lib/pigpio/wave.rb', line 92

def max_cbs
  IF.wave_get_max_cbs(@pi)
end

#max_microsObject



68
69
70
# File 'lib/pigpio/wave.rb', line 68

def max_micros
  IF.wave_get_max_micros(@pi)
end

#max_pulsesObject



80
81
82
# File 'lib/pigpio/wave.rb', line 80

def max_pulses
  IF.wave_get_max_pulses(@pi)
end

#microsObject



60
61
62
# File 'lib/pigpio/wave.rb', line 60

def micros
  IF.wave_get_micros(@pi)
end

#pulse(on, off, us) ⇒ Object



96
97
98
# File 'lib/pigpio/wave.rb', line 96

def pulse(on, off, us)
  Pulse.make(on, off, us)
end

#pulsesObject



72
73
74
# File 'lib/pigpio/wave.rb', line 72

def pulses
  IF.wave_get_pulses(@pi)
end

#send_once(id) ⇒ Object



32
33
34
# File 'lib/pigpio/wave.rb', line 32

def send_once(id)
  IF.wave_send_once(@pi, id)
end

#send_repeat(id) ⇒ Object



36
37
38
# File 'lib/pigpio/wave.rb', line 36

def send_repeat(id)
  IF.wave_send_repeat(@pi, id)
end

#send_using_mode(id, mode) ⇒ Object



40
41
42
# File 'lib/pigpio/wave.rb', line 40

def send_using_mode(id, mode)
  IF.wave_send_using_mode(@pi, id, mode)
end

#tx_atObject



48
49
50
# File 'lib/pigpio/wave.rb', line 48

def tx_at
  IF.wave_tx_at(@pi)
end

#tx_busyObject



52
53
54
# File 'lib/pigpio/wave.rb', line 52

def tx_busy
  IF.wave_tx_busy(@pi)
end

#tx_stopObject



56
57
58
# File 'lib/pigpio/wave.rb', line 56

def tx_stop
  IF.wave_tx_stop(@pi)
end