This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMP126-Q1: Trouble Setting Alarm

Part Number: TMP126-Q1
Other Parts Discussed in Thread: TMP126

Hi there,

I had a question regarding not being able to set the Alert as expected on the tmp126. I was hoping you could have a look at my bit of arduino code and let me know if you have any recommendations on things to change. I created a method to read that's been working fine, but now that I'm trying to create an equivalent method for writing, I haven't had any luck. 

So, if from my external application I've been controlling it using serial port write commands. So if I send a trio of 0x31, 0x32, and 0x33, I'd get the following:

So where I have my problem is when I try to set my Alert_enable to only flag Thigh_alert, set my Tlimit to 25C, and then read my Alert_status. My alert isn't being set up correctly as my Alert_status randomly switches between 0 and 1:

Let me know if what I'm trying to do makes sense and what I should change to get there.

Thanks!