slejos wrote:I have a questions is it possible to look for all attached sensors and draw the result on the display?
Because I want to put the sensors in random sockets and dont want to only use the specific socket for one sensor.
Please tell me if its possible and how??
I have to disappoint you: you are not the first one who had that idea with lejos. I already had the same idea (and someone else maybe much earlier).
I once tried to program a flexible software architecture which indeed was first doing a kind of "power on self test"
as it is always happening when you start your computer before it boots the operating system.
The power on self test targeted at detecting all devices which were plugged in and serving dynamic access on them.
My experience was: It is very hard or impossible to find out which sensor or motor is plugged in to which port.
Some sensors like those ones manufactured by hitechnic give you at least some sensor metainformation like the type of the sensor, others like those ones by lego do not at all.
As each sensor or motor serves a purpose and several ones of each can be plugged in at the same time (e.g. two motors and two distance sensors),
the information about sensors/motors plugged in can be quite useless. E.g. you detect two motors und you know one is the right one and the other one is the left one.
If you don't have a compass sensor which allows you to find out the orientation of your nxt-vehicle, then you cannot find out which of both motors is the right or the left one.
(Otherwise you could find out the left motor by making one random motor of both just moving and observe the change of the orientation with the compass sensor.
This approach makes only sense with an conceptual model like "the vehicle has a left and a right motor, a compass sensor and a distance sensor left and one right ...")
You usually "tag" devices like sensors and motors in the area of "embedded systems" , i.e. you leave special information you can read out for identification of devices.
No sensor with nxt gives you the opportunity as far as I know
Maybe someone will once create some additional hardware for "tagging" devices ...
(I would like to do it but I'm not a technician for microelectronics yet. Moreover I have no time but too many projects I still have to finish before I begin new ones like that one ...
Frankly speaking, I would give that idea up because you waste only your time (as I was doing once).
I know it would be nice when you could just plug in your sensors and motors while ignoring the sockets.