title: Robotc - Finding balls, grab and drop
body: <p>I have to solve a problem with EV3, using language C with ROBOTC.</p>
  
  <p>I am trying to find a ball in the field, grab it and drop in the triangle area.
  I'm using a ultrasonic sensor in front of the robot.</p>
  
  <p>My solution for now is:</p>
  
  <p>Turn 360 degrees and find the closest object. After finding the ball, I would like to drop it in the reserved area. That's ok.</p>
  
  <p>The big problem is: </p>
  
  <p>How can I distinct the balls with the triangle area?
  After grabbing the ball, I need to drop in the trinagle. </p>
  
  <p>How about the walls? How can I differentiate?</p>
  
  <p>Steps:
  Turn 360 and find the closest ball.
  Go to the triangle.
  Drop it.
  Turn 360 and find the closest ball.
  And so on.</p>
  
  <p>But with sonic sensor, I can't distinct what's the triangle area and balls.</p>
  
  <p>Can you help me the best way?</p>
  
  <p>It's following the images:</p>
  
  <p><a href="https://i.stack.imgur.com/bPtS3.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bPtS3.jpg" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/KlDuZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KlDuZ.png" alt="enter image description here"></a></p>