Skip to content

Commit

Permalink
Added simple script to flash LEDs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack committed Dec 16, 2016
1 parent 6e9db3b commit 2084656
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test_led.py
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)



0 comments on commit 2084656

Please sign in to comment.