def METHOD_NAME(pos):
    DIGITALPIN_URL = "http://" + ROBOTINOIP + "/data/digitalinputarray"
    r = requests.get(url = DIGITALPIN_URL, params = PARAMS)
    if r.status_code == requests.codes.ok:
        data = r.json()
        return data[pos-1]
    else:
        return -1