|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Auto Ultrasonic Distance Sensor
So we are trying to code the robot to do forward from its starting position till it reaches a specific distance from the wall. We are using a MB1040 as the distance sensor. The code, which is attached, for some reason just makes the robot keep going forever forward. The sensor has been tested and it works perfectly. I'm sure I'm probably just missing something really stupid
. Any help would be much appreciated. |
|
#2
|
||||
|
||||
|
Re: Auto Ultrasonic Distance Sensor
You need a stop for the drive. If you just write a -1 value to the drive it will continue to drive.
|
|
#3
|
|||
|
|||
|
Re: Auto Ultrasonic Distance Sensor
Oh wow. I did that for the launcher motors but didn't do it for the driving ones. Ok thanks! Easy fix
![]() |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|