How do I poll for sensors and their types?

This is where you talk about the NXJ software itself, installation issues, and programming talk.

Moderators: 99jonathan, roger, imaqine

How do I poll for sensors and their types?

Postby ScottFrasso » Fri Jun 08, 2007 2:50 pm

I read the API and how it talks about polling for sensors, However I am not sure as to find their type.

An example of this would be if a user had a temperature sensor and a motor (or something) connected to the brick. When the user starts their program on the PC I would like to display which sensors are connected where, without the user physically checking the brick and entering that data into the PC.

Is this possible? If so how would you go about implementing this?
ScottFrasso
New User
 
Posts: 1
Joined: Fri Jun 08, 2007 2:43 pm
Location: Boston, MA

Postby lawrie » Mon Jun 11, 2007 7:46 pm

You can do this for I2C sensors as all the ones I have seen respond to standard messages asking for their type, manufacturer and version.

You cannot do it for Analog/Digital sensors like the Light/Touch and Sound sensor.
lawrie
leJOS Team Member
 
Posts: 922
Joined: Mon Feb 05, 2007 1:27 pm

Postby Elnof » Mon Jun 25, 2007 10:46 pm

So there would be no way to do it? Dang...
Elnof
New User
 
Posts: 8
Joined: Mon Jun 25, 2007 10:44 pm


Return to NXJ Software

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 1 guest

more stuff