-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jack
committed
Dec 16, 2016
1 parent
6e9db3b
commit 2084656
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import corr | ||
import i2cSnap | ||
import time | ||
|
||
HOST = '10.1.0.23' | ||
LED0_ADDR = 0x21 | ||
LED1_ADDR = 0x20 | ||
|
||
r = corr.katcp_wrapper.FpgaClient(HOST) | ||
time.sleep(0.1) | ||
|
||
i2c = i2cSnap.I2C(r, 'i2c_ant1') | ||
i2c.clockSpeed(200) | ||
|
||
i=0 | ||
while(True): | ||
i2c.writeSlave(LED0_ADDR, i%256) | ||
i2c.writeSlave(LED1_ADDR, i%256) | ||
i += 1 | ||
time.sleep(0.05) | ||
|
||
|
||
|