Answers.Body: <p>Branches run simultaneously. If you want to pause a branch until a certain sensor condition is met, use a Wait block.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2013-04-13T11:10:10.960Z
Answers.LastActivityDate: 2013-04-13T11:10:10.960Z
Answers.UserDisplayName: shea
Body: <p>For a sumo bot competition I made a robot that has a perfectly functioning ultrasonic senor. However, when I made a second branch on the program for a light sensor, I calibrated the light sensor and when I set it over the line so the robot would move correctly, it does not respond as expected. </p>
  
  <p>My thoughts are that it has to do something with the priorities of the branches. How do I set the light sensor branch to have a higher priority over the ultrasonic sensor branch? I would like it to work so that when the light sensor doesn't detect something in the specified range of intensity that it goes to the ultrasonic sensor branch and go to the light sensor branch if an intensity inside the specified range it goes to the light sensor branch at a high frequency of resolution.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2013-04-13T11:10:31.260Z
Comments.Text: Can you please post a screenshot of your current program?
Comments.UserDisplayName: shea
Tags: <programming><nxt-g>
Title: Setting priorities in LEGO NXT Programmer
UserDisplayName: Mab879
ThreadText: # Setting priorities in LEGO NXT Programmer
  
  (Asked by: username_0 on 2013-04-13)
  
  For a sumo bot competition I made a robot that has a perfectly functioning ultrasonic senor. However, when I made a second branch on the program for a light sensor, I calibrated the light sensor and when I set it over the line so the robot would move correctly, it does not respond as expected.
  
  My thoughts are that it has to do something with the priorities of the branches. How do I set the light sensor branch to have a higher priority over the ultrasonic sensor branch? I would like it to work so that when the light sensor doesn't detect something in the specified range of intensity that it goes to the ultrasonic sensor branch and go to the light sensor branch if an intensity inside the specified range it goes to the light sensor branch at a high frequency of resolution.
  
  **Tags:** programming, nxt-g
  > **Comments:**
  > **username_1**: Can you please post a screenshot of your current program?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2013-04-13. Score: 3 | Accepted answer
  
  Branches run simultaneously. If you want to pause a branch until a certain sensor condition is met, use a Wait block.
  
  
  ---
  
  