def test_setMode(self): UARTDevice.setMode(2,0) time.sleep(1) UARTDevice.setMode(2,1) time.sleep(1) UARTDevice.setMode(2,2) print "Color Sensor test!" for i in range(0,10): print UARTDevice.getValueByte(2) time.sleep(1) UARTDevice.reset(2)