LoveElectronics pH & Temperature Module error

Hi guys, I need some help but LoveElectronics’ forum seems down.

I have the pH & Temp module and could get as far as phTemp.Connect() returning true.

but calling pHTemp.ReadPH() or pHTemp.ReadTemperature() always throws the following exception:

Exception System.IndexOutOfRangeException - 0xa9000000 (4)

#### Message: 
#### Gadgeteer.Modules.LoveElectronics.MCP342X::ReadValue [IP: 000a] ####
#### Gadgeteer.Modules.LoveElectronics.MCP342X::ReadChannel [IP: 0010] ####

Anyone got it working?

Thank you :slight_smile:

pHTemp.DebugPrintEnabled = true;
            pHTemp.phOffset = 0;
            pHTemp.phSlope = 58.7;
            pHTemp.TemperatureCurve = pHTemp.GetExampleTemperatureCurveDataPoints(Gadgeteer.Modules.LoveElectronics.PHTemp.ExampleRTDCurve.Pt100);
            var isConnected = pHTemp.Connect(GTM.LoveElectronics.PHTemp.AddressPin.Floating, GTM.LoveElectronics.PHTemp.AddressPin.Floating);
            if (isConnected)
            {
                pHTemp.SetResolution(GTM.LoveElectronics.MCP324XResolution.TwelveBits);
                pHTemp.SaveSettings();

                    try
                    {
                        Debug.Print("Trying...");
                        Debug.Print(pHTemp.ReadPH().ToString());
                        Debug.Print(pHTemp.ReadTemperature().ToString());
                    }
                    catch (Exception e)
                    {
                        Debug.Print(e.Message + e.StackTrace);
                    }
            }

Looks like a driver issue. Check CodePlex for the source to try and fix. I’d also recommend reporting it to love electronics directly.

Hi Skewworks,

unfortunately I couldn’t find any source code from LoveElectronics on CodePlex… Thanks for the prompt response though :slight_smile:

If you can’t find source code for the driver, you can try to decompile the driver with reflector.