RPM revs up and down non-stop and now check engine lite. 1998 EX v6

From prior experience I would suspect a sticky thermostat, which keeps the engine from fully warming up.