Thermal flow sensor for the measurement in one or two directions of the flow velocity of air and gases with simultaneous detection of the flow direction. Extremely compact because electronics are integrated in the sensor tube. Sensor element located in the chamber head and protected against mechanical load. Linear analog output to indicate the measurement values, two switching outputs to output the flow direction and the signal of the threshold value. Can be configured on-site via an integrated RS232 interface by means of a programming kit for Windows PC's. When installed in a measuring tube, it is suitable for the measurement of the standard volumetric flow or the mass flow.