Hi! 9 years after my last post about this I pulled out my old 1135 analog voltage sensor and trying to get it to work. I used the nice example from phidget22 library and I get a voltage of:
Voltage: 3.389900
Using this program
#include <phidget22.h>
#include <stdio.h>
static void CCONV onVoltageChange(PhidgetVoltageInputHandle ch, void * ctx, double voltage) {
printf("Voltage: %lf\n", voltage);
}
int main() {
PhidgetVoltageInputHandle voltageInput7;
PhidgetVoltageInput_create(&voltageInput7);
Phidget_setDeviceSerialNumber((PhidgetHandle)voltageInput7, 155928);
Phidget_setChannel((PhidgetHandle)voltageInput7, 7);
PhidgetVoltageInput_setOnVoltageChangeHandler(voltageInput7, onVoltageChange, NULL);
Phidget_openWaitForAttachment((PhidgetHandle)voltageInput7, 5000);
//Wait until Enter has been pressed before exiting
getchar();
Phidget_close((PhidgetHandle)voltageInput7);
PhidgetVoltageInput_delete(&voltageInput7);
}
My voltmeter reads 12.8V on the battery at the same point of contact where the 1135 is connected to. What am I doing wrong?
Thanks