Triggering with ultrasonic rangers

Hello,

I am going to use arduino interfacing with processng. Processing will be used for developing the interface which is going to be triggered when somebody walks by in. I have kind of rough idea right now using ping method to trigger interface on the screen. My question is

Lets say if I have two ultrasonic rangers, how can I trigger two different events on the same screen?i.e. how can I make two different arduino sketch talk to the same processing sketch? and I have this doubt because I am going to use two arduinos instead of one,because 1st event should be triggered when a person is 15meters away from the screen and another event when he gets closer like 6 meters away from the screen.

One more question, can I setup this physical environment using single arduino?

Thanks a lot,
Dhruv

how can I make two different arduino sketch talk to the same processing sketch?

In processing you select a serial port to use in the setup(). This is normally just the first on it finds. If you have two Arduinos, there will be two different serial ports you can select. Select the one you want to talk to and close the other one.

can I setup this physical environment using single arduino

I don't see any reason why you would even consider two Arduinos for this, it is perfectly possible to do it with one.

Hey Mike,

Thanks for your reply.

Can I still keep two ultrasonic rangers 12 meters apart with the help of single arduino?

Dhruv