i am trying to get a very basic sensor configuration working and i'm facing issues, so would appreciate some help here.
Setup + environment:
I'm working on a windows 7 sp1 machine with 8 gigs of memory and JDK 1.7.0_25. I have purchased a PhidgetInterfaceKit 8/8/8 board (1018) and a couple of sensors (Luminance, 1143 and Temperature/Humidity, 1125).
My goal is to be able to periodically read data from the sensors and record their values in an application db. For this purpose, i have connected the sensors to the 1018 analog input ports and the 1018 itself to a USB port in my PC, using the cables that came with the devices.
Testing process + issue at hand:
Initially, i run the Phidget Control Panel to check whether everything was connected properly. Both sensors seemed to be working and recording values that correspond to environmental conditions.
Then i tried to work with the Java API to register the proper event handlers that would allow me to get these values programmatically. I am experienced in Java and the tutorials seemed straightforward. I started with the HelloWorld class and it just worked. Then i tried to extend this example and this is where things started being incomprehensible.
First of all, i noticed from the start that the 1018 was the only Phidget listed by the AttachListener. This seemed a bit strange, given that the sensors were attached to it and working properly as verified by the Control Panel, however i thought that maybe the 1143 and 1125 needed to be explicitly opened/attached, so i tried to do just that.
Omitting the 1143 for the time being, since i could not find a representing class in the API, i focused on the 1125. I tried the sequence of openAny and waitForAttachment commands, as seemed reasonable and also suggested in sample code (TemperatureExample) and elsewhere. However, execution hanged on waitForAttachment. If on the other hand i omitted the waitForAttachment statement, trying to getAmbientTemperature produced a PhidgetException 5 (Phidget not physically attached.) as would be expected.
I tried a number of things here, including numerous code permutations and experiments, running the TemperatureExample as-is, changing USB port and cable, using compliance JRE modes (al the way back to 1.2) and even eventually switching to Python, all of which produced the exact same result.
I'm pretty sure by now there is something fundamentally wrong here, just not sure at all what it could be, so any help would be greatly appreciated.
Thanks in advance