How do you program it to run straight in till (as in actually interuping the curent task (of driving straight,)) it gets to a wall and then turn? Also, can you use it like a motion sensor?
Well, it sounds like you want a switch block in your program. You can set the switch block to use the ultrasonic sensor, and then set the parameters to how close/far away the object will be. Put whatever blocks you want to execute if the parameters are true in the upper sequence beam of the switch block, and whatever blocks you want to execute if the parameters are false in the lower sequence beam. Hope that helps. NXTFreak
How do you program it to run straight in till (as in actually interuping the curent task (of driving straight,)) it gets to a wall and then turn? Also, can you use it like a motion sensor?
LoneWolf783 1 month ago
can you send me the program
TheNeXTStorm 6 months ago
@TheNeXTStorm @NXTFreak maybe put it up under video?
uhjohn 4 months ago
can you do it with one ultrasonic sensor too?
Rakaloe 9 months ago
then put a camera on it and- presto, it's a security cam!
Zyeiketopia1018 1 year ago
Thats cool but easy to programm... you can make tham to follow to object))) :D
DronElektron 2 years ago
good job :)
kayserikay 2 years ago
guys its so obvious..the last sensor triggerd is the way it turns...durh if not itd take 1
pjwithbread8 3 years ago
I agreee
DamianProgrammer 3 years ago
NXTFreak
How does it compare the values of the two sensors? Does it turn towards the largest value like my sound sensor face or what?
SciGuy16
SciGuy16 3 years ago
idk if u know how but i've been messing w/ my programming.....how do u get ur robot to back up if its too close or a wall or object like it??
magemager0 3 years ago 3
Well, it sounds like you want a switch block in your program. You can set the switch block to use the ultrasonic sensor, and then set the parameters to how close/far away the object will be. Put whatever blocks you want to execute if the parameters are true in the upper sequence beam of the switch block, and whatever blocks you want to execute if the parameters are false in the lower sequence beam. Hope that helps. NXTFreak
NXTFreak 3 years ago
So it rotates just fine.... can it follow an object forward and backward?
miglspam 3 years ago 3
No, it can't. It can only go left and right.
NXTFreak 3 years ago
Great! I definitely want two sonars now.
BoffinbraiN 4 years ago 3
yup
DamianProgrammer 3 years ago