I'd post some code, but my code is a mess, and I've tried it a few different ways. I'm using the Adafruit_PCD8544 library, PID_v1 library, the Time library, and the Encoder library, on a Teensy 3. I have the rotary encoder on Pins 5 and 6. I'm building a hotplate controller, so the screen displays the current temperature, set temperature, and a resettable timer (not using the RTC). So my problem is that the encoder really likes to miss steps when I have a temp sensor plugged into Analog 0. If I leave that input floating, so the temp is bouncing wildly, the encoder works just fine. I tried making it only sample the ADC once ever 100ms, as well as only run the PID and display once every 100ms, giving the lions share of the loop time. But still, as soon as I put anything on that analog pin, the encoder stops working.
Any suggestions?