Skip to content

Instantly share code, notes, and snippets.

@chaeplin
Last active August 29, 2015 14:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chaeplin/a1220c86d88421806215 to your computer and use it in GitHub Desktop.
Save chaeplin/a1220c86d88421806215 to your computer and use it in GitHub Desktop.
lgacir.py
# https://github.com/chaeplin/Arduino-IRremote/
# 02.test_i2c.py
import smbus
import time
bus = smbus.SMBus(1)
address = 0x07
def writeNumber(a, b ):
bus.write_i2c_block_data(address, a, [b])
writeNumber(25, 2)
# writeNumber(1, 0)
# writeNumber(0, 0)
# writeNumber(2, 1)
# writeNumber(3, 1)
# writeNumber(4, 2)
# writeNumber(5, 26)
#
#
# a : mode or temp b : air_flow, temp, swing, clean
# 18 ~ 30 : temp 0 ~ 2 : flow
# 0 : off 0
# 1 : on 0
# 2 : air_swing 0 or 1
# 3 : air_clean 0 or 1
# 4 : air_flow 0 ~ 3 : flow
# 5 : temp 18 ~ 30
# +
# -
# m
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment