how does LEGO MINDSTORMS Education NXT work?
i am programming LEGO MINDSTORMS Education NXT to control ultrasonic sensor to detect certain distances and i need to loop it so when it detects a certain distance it should give different sound.. i know how to put different sound in when it detects a certain distance but i can't do it that loop it so when it detects the same distance it should let the sound go off but it doesn't..
help would be appreciated!
thanks
You may need to post that part of the code, and it is still not clear what you want to detect.
Here is in pseudo code what I think you want to do
Say you sample sound at T intervals, so T is now, T-1 is the previous
Detect Distance(T)
If Distance(T) == Distance(T-1) // If same as before turn it off
then Turn off sound
else
PlaySound(Distance(T)) // Else play new sound
Currently Available on eBay
![]() |
![]() Lego Mindstorms 9648 - Resource Set - Education £45.50
|
![]() Lego Mindstorms - NXT – Education 9797 £101.00
|
![]() Lego Mindstorms Robot NXT Education Base Set 9797 £102.00
|
![]() Lego Mindstorms 9648 - Resource Set - Education £45.00
|
![]() Mind Body & Soul MinDStorm 2 Nintendo DS Video Game Educational Brand NEW Sealed £14.98
|
![]() Lego Mindstorms Education Nxt Software. Home, School, Office, Nursery. BN £27.56
|
![]() Lego 9797 Technic/Mindstorms Education NXT - Complete Set £165.00
|
And a selection of products from Amazon
![]() |
Mindstorms: Children, Computers, and Powerful Ideas
List Price: |
![]() |
Mindstorms: Children, Computers, And Powerful Ideas |
DescriptionA history of freedom in Western culture traces the evolution of this cherished idea from ancient times to the modern day. Reprint. National Book Award winner. NYT. |
![]() |
LEGO® MINDSTORMS® Education Resource Set
Sale Price: £71.99 |
DescriptionExtend the learning opportunities available with the LEGO® MINDSTORMS® Education Getting Started Set with this exciting resource set. Build additional robots (including a humanoid, scorpion, belt-driven colour sorter, intelligent car and robotic arm), create sturdier structures using the beams, axles and connectors, use different sized wheels to explore circumference, physical science and mathematics and experiment with belts to build caterpillar tracks and factory belts... |
![]() |
LEGO 8547 Mindstorms NXT 2.0 Robot
List Price: |
![]() |
LEGO 8527 Mindstorms NXT Robot
List Price: |
Lego Mindstorms Education


£45.50











