The Coolkits i10 has 16 io ports and an ethernet connection. The controlboard has an Rabbit 2000. The status of the board can be viewed and controlled by an builtin webserver, console (telnet and serial).
With i10 python interface you can control the i10. You can view and control the 16 io ports and other settings like the clock, tcp/ip and security.
This code blinks the leds on and off.
from i10 import I10Device
import thread
import time
def nightrider(i10,n):
dir=1
pos=0
for i in xrange(n*16+n*2+1):
i10.SetOutput(pos,1)
time.sleep(0.1)
i10.SetOutput(pos,0)
pos=pos+dir
if pos==0 or pos==15:
dir=-dir
def blink(i10,n):
a=1
for i in xrange(n*2+1):
print "blink %d"%i
a=not a
time.sleep(1)
for i in range(16):
i10.SetOutput(i,a)
def resetoutput(i10):
for i in range(16):
i10.SetDirection(i,1)
for i in range(16):
i10.SetOutput(i,0)
if __name__=='__main__':
i10=I10Device()
i10.LinkConnect("192.168.0.12") #change the ip to your i10 ip
##or
## to automaticly connect to your i10 (the first that broadcasts a message)
#def connectafteronelistfound(self,deviceip,devicetype,deviceversion):
# self.LinkConnect(deviceip)
#i10.ListFound=lambda *x:connectafteronelistfound(i10,*x)
#i10.ListDevices()
t=thread.start_new_thread(i10.eventloop,())
i10.Login("admin","admin") #change the password to your i10 password
resetoutput(i10)
#nightrider(i10,5)
blink(i10,5)
i10.LinkClose()
Copyright (C) 2003 David Rasch
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License (GPL) as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details.