updated code to reflect latest arduino_uip