PhidgetBridge 4-Inputs 1046 conn. to Android 4.4.4 device

Supporting 4.1 and up
justbit
Fresh meat
Posts: 2
Joined: Fri Jan 30, 2015 8:21 am
Contact:

PhidgetBridge 4-Inputs 1046 conn. to Android 4.4.4 device

Postby justbit » Fri Feb 06, 2015 8:50 am

Hello,

I bought the controller PhidgetBridge 4-Inputs 1046 and 2 load cells: 3135 Micro Load Cell (0-50kg) and 3136 Button Load Cell (0-50kg)
it works well if i connect the controller to my notebook with windows 7
but i have a problem when i connect it to my Android device
when i run InterfaceKitUSBExample, all fields remain in the unknown state while if i run HelloWorld example it shows the correct controller info

what is it wrong with the InterfaceKitUSBExample?

I'm using android studio...

thx for any reply,

Riccardo

User avatar
mparadis
Site Admin
Posts: 624
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: PhidgetBridge 4-Inputs 1046 conn. to Android 4.4.4 devic

Postby mparadis » Fri Feb 06, 2015 10:42 am

The InterfaceKitUSB examples only work on boards that use the InterfaceKitPhidget object like the 1018 or the 1012. The 1046 uses the BridgePhidget object, so it doesn't show up in the text fields. At this time we only have examples for InterfaceKit devices in Android Java.

justbit
Fresh meat
Posts: 2
Joined: Fri Jan 30, 2015 8:21 am
Contact:

Re: PhidgetBridge 4-Inputs 1046 conn. to Android 4.4.4 devic

Postby justbit » Fri Feb 06, 2015 10:58 am

so how can i set a listener to read data from a load cell connected?
for example my load cell is connected to port 0

Using the HelloWorld example, i think i have to set my listeners after this code section:

device.addAttachListener(new AttachListener() {
public void attached(final AttachEvent attachEvent) {
// Do things after attachment (i.e. read data, control the device)
...



ok i found the right way
thx anyway


Return to “Android”

Who is online

Users browsing this forum: No registered users and 2 guests