def pixy_value_update(blocks):
    """ Prints the Pixy blocks data."""
    if len(blocks) > 0:
        pan_error = X_CENTER - blocks[0]["x"]
        tilt_error = blocks[0]["y"] - Y_CENTER
        pan_loop.update(pan_error)
        tilt_loop.update(tilt_error)

        loop = asyncio.get_event_loop()
        if loop.is_running():
            # This is the version that will be used since we are in a callback, but I wanted to show how to
            # properly protect against calls to board.something when you don't know if you are in the non-async
            # land vs when you are currently executing code from within async land.
            asyncio.ensure_future(board.core.analog_write(PIN_PAN_SERVO, int(pan_loop.position * 180 / 1000)))
            asyncio.ensure_future(board.core.analog_write(PIN_TILT_SERVO, int(tilt_loop.position * 180 / 1000)))
        else:
            board.analog_write(PIN_PAN_SERVO, int(pan_loop.position * 180 / 1000))
            board.analog_write(PIN_TILT_SERVO, int(tilt_loop.position * 180 / 1000))
Prints the Pixy blocks data.