The oil pressure has to be checked with a mechanical pressure gauge. If the pressure is correct the oil pressure sending unit has to be replaced, if there is no pressure or lower than specified, prepare yourself for a serious engine work.
Bad sensor is a common thing. If there is sludge and gunk in the engine, get rid of it because it can get into the new sensor. Remove the oil filler cap and check at the top of the valve cover if you see an excessive amount of deposit there.