def getInt(f):
    """\
    Read a 4 byte integer sent by the Arduino

    :param f: file handle for the serial connection to the Arduino Due

    :returns value: 32-bit unsigned integer (read as 4 bytes, most significant byte first)
    """
    n=f.read(4)
    v = (ord(n[0])<<24) + (ord(n[1])<<16) + (ord(n[2])<<8) + ord(n[3])
    return v