Am I doing too much//this right? (Temp + screen + encoder)

Hi, I’m driving to drive a 12864B screen using U8G2 library along with a MAX6675 and a rotary encoder, essentially want a temperature on a screen then a dial to select one, which will trigger a relay to switch the heater on.

My source is attached.

The problem is I’m getting wild readings of my temp sensor and display errors on the screen and the encoder doesn’t seem to work when it’s all hooked together, individually I’ve had them all working but together they don’t.

This is on an arduino nano and uno I’ve been working, the clocks and data pins for the max and screen together with separate CS which is what I’ve read is what to do for multiple SPI devices, encoder is on 2 & 3 for interrupts.

What am I doing wrong?

main.cpp (1.25 KB)

Hi!
Most items works when You run them separately but together things don't work. That sounds like insufficient power supplied. Attach a wiring diagram regarding pwr. It can be hand written and copied. No CAD-file...

Please read the advice at the top, how to attache code etc. The title is "General Guidance and How to use the forum". Use "code tags", top left in this window, explained at #7.
Your cpp-attachement doesn't download here.