Class: WiringPi::Modules::Mcp23017

Inherits:
ModuleBase show all
Defined in:
lib/wiringpi/mcp23x17.rb

Instance Attribute Summary

Attributes inherited from ModuleBase

#name, #pin_base, #pin_count, #pin_end

Instance Method Summary collapse

Methods inherited from ModuleBase

#new, #updateName

Constructor Details

#initialize(pin_base, i2c_address) ⇒ Mcp23017

Returns a new instance of Mcp23017.



7
8
9
10
11
12
13
# File 'lib/wiringpi/mcp23x17.rb', line 7

def initialize(pin_base, i2c_address)
  @pin_base = pin_base
  @pin_count = 16
  @i2c_address = i2c_address
  Wiringpi.mcp23017Setup( pin_base, i2c_address )
  super()
end