Products for USB Sensing and Control
It is currently Tue Jun 18, 2013 6:01 pm

All times are UTC - 7 hours [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue Jul 08, 2008 12:42 pm 
Offline
Fresh meat

Joined: Tue Jul 08, 2008 12:29 pm
Posts: 1
Hi folks,

I have to develope an interective installation controlled by n.16 "1102 IR Reflective Sensor 5mm" simultaneously. I'm a newby whit AS3 (coming from 2.0) so I tryed whit the flash exemple files founded in the download area (Interfacekit-movieclip-control.fla and Interfacekit-full.fla). they perfectly work whit a single interface kit but the problem is whit these Flash files I can get information from only one intarface kit at a time while I need to get all the return value from both simultaneously.
Could you help me find a solution?

thanks

Derius


Top
 Profile  
 
PostPosted: Fri Jul 30, 2010 11:49 am 
Offline
Fresh meat

Joined: Fri Jul 30, 2010 11:46 am
Posts: 1
I solved the problem this way:


import com.phidgets.*;
import com.phidgets.events.*;


var phid:PhidgetInterfaceKit;
phid = new PhidgetInterfaceKit();

var phid2:PhidgetInterfaceKit;
phid2 = new PhidgetInterfaceKit();

//last number is the serial number shown on control pannel
phid.open("localhost", 5001, "",115932);
phid2.open("localhost", 5001,"", 116925);

phid.addEventListener(PhidgetDataEvent.SENSOR_CHANGE, mudaValor);
function mudaValor(evt:PhidgetDataEvent):void {
var sensor2 = phid.getSensorValue(2);
trace (sensor2)
}

phid2.addEventListener(PhidgetDataEvent.SENSOR_CHANGE, mudaValor2);
function mudaValor2(evt:PhidgetDataEvent):void {

var sensor5=phid2.getSensorValue(5);
trace (sensor5)

}


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 7 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group