Friday, 31 January 2014

New Objects

Converted mcptest.py code to a new class, added Chess_Hardware.py to test new class.  Work started on code to test if a piece has moved on the board.

Chess_Hardware.py

#Hardware Test Program
import McpBoard
from time import sleep
theBoard = McpBoard.McpChessBoard()
#print theBoard.scanMCPBoard()
theBoard.ledAllOff()
#theBoard.ledMCPBoard('c1',True)
while True:
  theBoard.storeMCPBoard()
  print "stored"
  sleep(3)
  currentList = theBoard.scanMCPBoard()
  theBoard.compareMCPBoard(currentList)
  print "wait"
  sleep(3)