.
Here is what it looks like (orange wire and above is from an unrelated 1-wire circuit):
K8000 reference is here:
Here are the results of the first chip at address 0x38.
i2cget -y 2 0x38
0x8f
0x39 works as well, but is currently configured to have the 4 most significant bits as outputs.
This python script also works to control the IO on the K8000 (which has the PCF8574A chips) via the BBB:
Here is my modified script to turn RED and GRN LEDS on and off:
#!/usr/bin/python
#
# access K8000 via BBB i2c
from smbus import SMBus
from itertools import cycle
from time import sleep
LIGHTSOFF = 0xff
LIGHTSON = 0x9f
REDON = 0Xbf
GRNON = 0Xdf
LIGHTS = (LIGHTSON, REDON, GRNON, LIGHTSOFF)
bus = SMBus(2) # bus 2 is wired to talk with k8000
for OUTPUT in cycle(LIGHTS):
bus.write_byte(0x39, OUTPUT)
sleep(0.1)
No comments:
Post a Comment