Answers.Body: <p>Yes it's definitely possible. See the motor functions <a href="http://bricxcc.sourceforge.net/nbc/nxcdoc/nxcapi/group___output_module_functions.html" rel="nofollow noreferrer">here</a>. I would try the following:</p>
  
  <ol>
  <li>Receive the controller's position over bluetooth.</li>
  <li>Use <code>MotorTachoCount (byte output)</code> to get the position of the steering motor.</li>
  <li><p>Compare controller's position to the steering motor's position.</p>
  
  <p><code>if(controller &gt; steering) drive steering forward.
  else drive steering backward.</code>  </p></li>
  <li>Repeat 1-4.</li>
  </ol>
  
  <p>There are a few enhancements you can make as well, once you get this working. For one, it may help to set the steering motor's power proportional to the difference between the positions. For example, <code>pwr = 0.5*abs(controller - steering)</code> . Adjust the 0.5 by trial and error until the steering is responsive, but not over-responsive. This will make the steering faster if the difference is large, and slower when the difference is small. It may also be worth looking into the motor PID functions to make the steering even smoother.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-19T16:27:26.640Z
Answers.LastActivityDate: 2018-07-19T16:27:26.640Z
Answers.UserDisplayName: MindS1
Body: <p>I've built a steering wheel that checks the servomotor position using NXC function - <code>MotorRotationCount()</code>. Now, I want to send that position to second brick using Bluetooth and apply that servomotor position to another servomotor controlling the car's steering. I've figured out how to send the data between bricks but I can't find a way to mirror that servomotor position. Is it possible?</p>
  
Tags: <nxt><programming><bluetooth><nxc><motor>
Title: How to send through Bluetooth motor angle position and mirror that position on another motor?
UserDisplayName: Kacper Reicher
ThreadText: # How to send through Bluetooth motor angle position and mirror that position on another motor?
  
  (Asked by: username_0 on 2018-07-18)
  
  I've built a steering wheel that checks the servomotor position using NXC function - `MotorRotationCount()`. Now, I want to send that position to second brick using Bluetooth and apply that servomotor position to another servomotor controlling the car's steering. I've figured out how to send the data between bricks but I can't find a way to mirror that servomotor position. Is it possible?
  
  **Tags:** nxt, programming, bluetooth, nxc, motor
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-07-19. Score: 0 | Accepted answer
  
  Yes it's definitely possible. See the motor functions [here](http://bricxcc.sourceforge.net/nbc/nxcdoc/nxcapi/group___output_module_functions.html). I would try the following:
  
  1. Receive the controller's position over bluetooth.
  2. Use `MotorTachoCount (byte output)` to get the position of the steering motor.
  3. Compare controller's position to the steering motor's position.
  
     `if(controller > steering) drive steering forward.
     else drive steering backward.`
  4. Repeat 1-4.
  
  There are a few enhancements you can make as well, once you get this working. For one, it may help to set the steering motor's power proportional to the difference between the positions. For example, `pwr = 0.5*abs(controller - steering)` . Adjust the 0.5 by trial and error until the steering is responsive, but not over-responsive. This will make the steering faster if the difference is large, and slower when the difference is small. It may also be worth looking into the motor PID functions to make the steering even smoother.
  
  
  ---
  
  