So what's happening is after the `display_digits()` function gets called (from the PCINT0 ISR), the MCU (I'm using an ATmega328P) hangs, and doesn't go back to sleep. Furthermore, after the `display_digits()` function is called, the `get_temp()` function stops working (It only receives 0 even though I can see that the sensor data communication is happening just fine on the scope after the `display_digits()` function has been called).
Something is getting set or disabled that is preventing the MCU from entering back into its sleep loop, and the same thing is also interfering with the get_temp() function. But I have absolutely no Idea what that would be. I'm hoping that another set of eyes would be able to help me out with this.
Here is my code: https://pastebin.com/DXw1jUim
Background: This is for a simple min/max thermometer project. Takes in some simple commands from 4 buttons (display current temp, display min temp, display max temp, reset min and max temps), and displays the temperatures onto seven segment displays.