A novel magnetic field sensor (MFS) may be created with an organic light emitting diode (OLED) made from an organic semiconductor material and an organic photodetector (OPD) built directly on top (or below) of the OLED, wherein at least one layer is made from an oriented molecular or polymer organic semiconductor material with strong magnetic anisotropy, and which material has a magneto-resistive or magneto-electroluminescent signal that varies with the magnitude and direction of a magnetic field to allow for measuring the vector of the external magnetic field.