def METHOD_NAME():
    global last_update
    data = bytearray('')
    datastr = ''
    last_input = 0
    steering_val = steering.value
    throttle_val = throttle.value
    while True:
        # only update every smoothing interval (to avoid jumping)
        if(last_update + SMOOTHING_INTERVAL_IN_S > time.monotonic()):
            continue
        last_update = time.monotonic()
        # check for new RC values (channel will contain data)
        if(len(throttle.channel) != 0):
            # state_changed_throttle(throttle)
            state_changed(throttle)
        if(len(steering.channel) != 0):
            state_changed(steering)
        logger.info("Get: steering=%i, throttle=%i" % (int(steering.value), int(throttle.value)))
        # write the RC values to the RPi Serial
        uart.write(b"%i, %i\r\n" % (int(steering.value), int(throttle.value)))
        while True:
            # wait for data on the serial port and read 1 byte
            byte = uart.read(1)
            # if no data, break and continue with RC control
            if(byte == None):
                break
            last_input = time.monotonic()
            logger.debug("Read from UART: %s" % (byte))
            # if data is recieved, check if it is the end of a stream
            if(byte == b'\r'):
                data = bytearray('')
                # datastr = ''
                break
            data[len(data):len(data)] = byte
            # convert bytearray to string
            datastr = ''.join([chr(c) for c in data]).strip()
        # if we make it here, there is serial data from the previous step
        if(len(datastr) >= 10):
            steering_val = steering.value
            throttle_val = throttle.value
            try:
                steering_val= int(datastr[:4])
                throttle_val = int(datastr[-4:])
            except ValueError:
                None
            data = bytearray('')
            datastr = ''
            last_input = time.monotonic()
            logger.info("Set: steering=%i, throttle=%i" % (steering_val, throttle_val))
        if(last_input + 10 < time.monotonic()):
            # set the servo for RC control
            steering.servo.duty_cycle = servo_duty_cycle(steering.value)
            throttle.servo.duty_cycle = servo_duty_cycle(throttle.value)
            rear_light.run(steering.value, throttle.value)
        else:
            # set the servo for serial data (recieved)
            steering.servo.duty_cycle = servo_duty_cycle(steering_val)
            throttle.servo.duty_cycle = servo_duty_cycle(throttle_val)
            rear_light.run(steering_val, throttle_val)