Class: Denko::Connection::BinaryEcho

Inherits:
Object
  • Object
show all
Includes:
Behaviors::Reader, Behaviors::SinglePin
Defined in:
lib/denko/connection/binary_echo.rb

Constant Summary

Constants included from Behaviors::Reader

Behaviors::Reader::READ_WAIT_TIME

Constants included from Behaviors::Lifecycle

Behaviors::Lifecycle::CALLBACK_METHODS

Instance Attribute Summary

Attributes included from Behaviors::State

#state

Attributes included from Behaviors::SinglePin

#mode, #pin

Attributes included from Behaviors::Component

#board, #params

Instance Method Summary collapse

Methods included from Behaviors::Reader

#_read, #read, #read_busy?, #read_nb, #read_raw, #read_using, #update

Methods included from Behaviors::Callbacks

#add_callback, #callbacks, #pre_callback_filter, #remove_callback, #update

Methods included from Behaviors::State

#update_state

Methods included from Behaviors::Lifecycle

included

Methods included from Behaviors::SinglePin

#convert_pins, #initialize_pins

Methods included from Behaviors::Component

#initialize, #micro_delay

Instance Method Details

#test_array(arr) ⇒ Object



12
13
14
# File 'lib/denko/connection/binary_echo.rb', line 12

def test_array(arr)
  board.binary_echo(pin, arr)
end

#test_range(min: 0, max: 255) ⇒ Object



7
8
9
10
# File 'lib/denko/connection/binary_echo.rb', line 7

def test_range(min:0, max:255)
  bytes = (min..max).to_a
  board.binary_echo(pin, bytes)
end