Portability is important in developing applications for Wireless Sensor Networks (WSN). The design for WSN sensor driver using of abstraction layer and FSM theory could achieve portability and improve WSN performance. The drivers of two different typical sensors were implemented, and according to FSM theory, the sensors state transition diagrams are depicted. We research the state transition in detail and summarize the interface. A key conclusion could be drawn that the operation of the sensors need the interface of Reset, Power Down, Start Read, etc. A UML generalization relationship could be created. On running time, the embedded programs access the driver implementation via universal virtual function interface, so that it could accommodate to various sensors.