Fully updated code of sensor mote and gaetway