Hello all, I'm relatively new to I2C communication, and I'm having a difficult time seting up communication between the SCD-30 sensor and the CR1000x. I'm not sure as to where to start and any help would be appreciated.
This is my code:
Public sense_out As String *19 Dim cont_meas As Long = {&H010000081} Dim meas_inrv As Long = {&H46000005E3} Dim cmd1 As Long = {&H0300} 'Main Program BeginProg PortPairConfig(C1,2) I2COpen (C1, 1000000) I2CWrite (C1,&H30,cont_meas,5,&H03) Delay (0,5,Sec) I2CWrite (C1,&H30,meas_inrv,5,&H03) Delay (0,5,Sec) Scan(1,sec,0,0) I2CWrite (C1,&H30,cmd1,2,&H03) Delay (0,3,Sec) I2CRead (C1,&H30,sense_out,18,&H03) NextScan EndProg
For reference, here is the SCD30 Interface Description.
While in the Data Monitor tab of the PC400, sense_out is returning a string of "?".