Você está na página 1de 3

+ ,-*&&

! " ! " # $ %
&& ' %
% " " % ( " " # " $ % ) % *
+ ,-*& &

The table documents the low-speed communication protocol which is used for communicating with the LEGO MINDSTORMS NXT Ultrasonic Sensor. Not all of these commands are
accessible within the software, but the ultrasonic sensor itself supports these commands and functionalities.

!
"# "# "# "# "# "# "# "# "# "#
$ % "# & ' "# $ % ( ) * + , -

/"" *

" ) & 0& & 0& & 1 &0& 2 3 & 04' &02- &0 & 02& & 0& & + -*&

" % " & 0& & 0&3 1 &0& 2 3 & 05 & 054 &056 & 057 & 0& &

" (% & 0& &0-& 1 &0& 2 3 & 042 & 0'7 &0' &0'- & 06 &0& &

" $ (8 9 -: & 0& & 0-- 1 &0& 2 - & 0&&

" $ ( $ 9 : & 0& &0- 1 &0& 2 - &0& -

" $ ( ") & 0& &0-2 1 &0& 2 - & 0&

" & 0& &0-5 1 &0& 2 6 &02- & 02& &054 &0 & 02 &0' & 0&& -& ;

. /

" ) & 0& & 05& 1 &0& 2 - )

" " & 0& &05- 1 &0& 2 - "

" <( & & 0& & 05 1 &0& 2 - -

" <( - & 0& & 052 1 &0& 2 -

" <( & 0& & 055 1 &0& 2 - 2

" <( 2 & 0& & 054 1 &0& 2 - 5

" <( 5 & 0& & 05' 1 &0& 2 - 4

" <( 4 & 0& & 056 1 &0& 2 - '

" <( ' & 0& & 053 1 &0& 2 - 6

" <( 6 & 0& & 05= 1 &0& 2 - 3

" 8 9 -: & 0& & 04& 1 &0& 2 - & 0&&

. &&' %
+ ,-*& &

" $ 9 : & 0& &04- 1 &0& 2 - &0& -

" ") & 0& & 04 1 &0& 2 - & 0&

$$ " & 0& &05- & 0& &

! " & 0& &05- &0& -

" 9" $ : & 0& &05- & 0&

) % " & 0& &05- & 0& 2

> ? & 0& &05- & 0& 5

) & 0& & 05& @ ) @

8 9 -: & 0& & 04& @+ @

$ 9 : & 0& &04- @+ @

") & 0& & 04 @+ @

Single shot command:


In this mode the ultrasonic sensor will only make a new measurement every time the command byte is send to the sensor. The sensor will measure distances for up to 8 objects and save the
distances within the Read measurement byte 0 7.

Continuous measurement command:


This is the default mode, where the sensor continuously makes new measurement with the specified interval.

Event capture command:


Within this mode the sensor will measure whether any other ultrasonic sensors are within the vicinity. With this information a program can evaluate when it is best to make a new
measurement which will not conflict with other ultrasonic sensors.

. &&' % 2

Você também pode gostar