GREAT, you are 99% of the way there.
The trick is to recognize which sketch to start with.
In this case, start with the display sketch and change the data to be displayed to the temp sensor. The temp sebnsor sketch is logically a half a dozen statements at most.
Without knowing the model of the display and not having an existing known working library for it, you are doomed to failure.
Have you been able to get the MLX90614 to work? Are you sure that is the part you are using, or is it also a mystery part from some unknown vendor?
At first I thought I knew the model but it wasn't the real model. As I wrote above, I thought the screen I bought was ssd1306. The model of the screen turned out to be ssh 1106. Therefore, I changed the library I was using. But the code didn't work. Also, uncle sonfcy, I tried everything, I connected resistors to a4 and a5, I tried that way, I tried all different modifications, I did what you said, I first turned the sensor on and then turned the screen on, it didn't work, I also tried integrating the codes with each other, it still didn't work. Friends, since the forum was really my last resort, I wrote, I thought of all the possible mistakes, applied them, contacted 4 different teachers from school, and still couldn't find it. Since there are people who really understand Arduino here, I asked for help. I apologize for acting like an idiot at first, I'm not an idiot.
The sensor can read the data alone and the screen displays the image alone. But when I combine the two, it doesn't matter which one I start first, they both freeze each other. I thought it was because the current was not enough, I measured the currents. The currents are correct. I thought there was insufficient voltage, so I pulled it from 3.3v to 5v, still nothing happened, finally I thought the problem was in the code, so I opened it with the title I don't know how to write code.
Post the two working sketches.
imagine like this
sensor mlx 90614
led display ssh1106
arduino nano
I don't know how to draw sketch I told you Im mechanical engineering student.
- You need the ssh1106 library then.
Adafruit_SH110X.h
Are you really using pin 1 of the Nano for the reset signal? Pins 0 and 1 are used for serial comms so best to choose another pin. If you are using the Nano RST pin, then the value should be -1.
for ssd1306 reset -1. I try to change for ssh1106
I will try. I was using U8g2
you are geneus man it work thank you so much