class ENZI::Wire
Wireクラス¶ ↑
I2C機能を提供するクラス
SAMPLE¶ ↑
wire = Wire.new(0, Wire::DutyCycle_2) wire.beginTransmission(0x6a) wire.write(address) wire.write(value) wire.endTransmission
Constants
- DutyCycle_16_9
SCLクロックLow/Highの時間比率 = 16/9
- DutyCycle_2
SCLクロックLow/Highの時間比率 = 2 (デフォルト)
Public Class Methods
new(addr = 0, duty = Wire::DutyCycle_2)
click to toggle source
Public Instance Methods
available()
click to toggle source
beginTransmission(addr)
click to toggle source
endTransmission()
click to toggle source
read()
click to toggle source
requestFrom(addr, count)
click to toggle source