import sys
import camabio
import cserial

if len(sys.argv) <= 2:
    sys.exit(1)


port = sys.argv[1]
on = int(sys.argv[2])
data = [0x55,0xaa,0x24,0x01,0x02,0x0,on,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x00,0x00]
camabio.setChksum(data)

cserial.writeAndRead(port,data)
