Wind direction via vane position is expressed with 7 bit gray codes. As the code disk rotates, the light path between an Infrared Emitting Diode (IRED) and a phototransistor is alternately blocked and left clear, thereby producing a gray code output corresponding to the ambient wind direction. The gray code is changed in steps of 2.8˚ one bit at a time to eliminate any ambiguities in the coding. Wind direction sensor is linked with wind speed sensor by cable. The direction sensor process both wind direction and wind speed. The sensor output data that is RS-232 type.