Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

MLX90614 i2c sensor to CR1000x


Yuvash Mar 26, 2024 11:04 AM

Hi everyone,

i am looking for a code to measure the temperature with the IRT MLX90614. I have tried to use different codes like this one without success:

Public Temp 
Public dest(3) As Long
'Main Program
BeginProg
  PortPairConfig(C5,2)
  I2COpen(C5,50000)
  Scan (10,sec,0,0)
    SWVX (VX3,1,0)      
      I2CWrite (C5, &h5A, &H07, 1,&H02)
      Delay (1,20,mSec)'Needed
      I2CRead (C5, &h5A, dest, 3,&H02)
      MoveBytes(Temp, 2, dest ,2, 2) 
    SWVX (VX3,0 ,0)    
    'CallTable Test
  NextScan
EndProg

 

Has anyone here tried to do this? any suggestions?


mipog Apr 2, 2024 11:16 AM

This post is under review.


--dd-- Apr 2, 2024 04:27 PM

Hi,

Are you sure you have the 3v version and not the 5v?

I have not tried that sensor, but with other sensors ,many times i have had better luck to send &H07000000 instead of just &H07. It is only needed to fill with zeros for the commands, not the address. See examples here: https://www.campbellsci.com/forum?l=thread&tid=17001

Are you sure about the &H02, have you tried &H03?

Have you added the pull-up resistors in your circuit?

Keep us updated if you succeed!


Yuvash Apr 3, 2024 06:37 AM

This post is under review.

Log in or register to post/reply in the forum.