Answers.Body: <p>You can run C++ programs directly on the EV3 (<a href="https://stackoverflow.com/a/37702134/1257035">Stackoverflow</a>). An Eclipse plugin is also available.</p>
  
  <p>If you want to run the C++ program on Windows and connect to the EV3 remotely you can use <a href="http://c4ev3.github.io" rel="nofollow noreferrer">c4ev3</a>'s <a href="http://github.com/c4ev3/ev3duder" rel="nofollow noreferrer">ev3duder</a>, to establish a connection to the device and then keep sending direct messages to the motors over that connection. Check out <a href="https://github.com/c4ev3/ev3duder/blob/master/moveEv3.pl" rel="nofollow noreferrer"><code>moveEv3.pl</code></a> for an example.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-09T09:14:14.057Z
Answers.LastActivityDate: 2016-06-09T09:14:14.057Z
Answers.LastEditDate: 2017-05-23T12:35:00.373Z
Answers.UserDisplayName: a3f
Body: <p>I've got an application within some VC++ software (<a href="http://www.bci2000.org/wiki/index.php/Main_Page" rel="nofollow noreferrer">BCI2000</a>). This is running on Windows 7. Although BCI2000 can run elsewhere, I'd like to stay on Windows. </p>
  
  <p>I've got an EV3 whose motors I'd like to manipulate within my existing application. I don't mind using bluetooth, wifi, or a wired connection, whatever is easiest.</p>
  
  <p>What would be the best way to go about doing this? I've read about <a href="http://www.ev3dev.org/" rel="nofollow noreferrer">ev3ev</a> and <a href="https://github.com/mindboards/ev3sources" rel="nofollow noreferrer">ev3 sources</a>, both look feasible. I also stumbled upon <a href="http://exolete.com/controlling-lego-mindstorms-ev3-with-cpp/" rel="nofollow noreferrer">this post</a> detailing control of the motors using just xcode with nothing installed on the brick. That looks ideal to me but my attempts at just injecting that code into my VC++ project have persistent dependency failures that I'm trying to fix <a href="https://bricks.stackexchange.com/questions/7132/how-do-i-add-the-lms2012-library-as-a-dependency-within-visual-studio">here</a>.</p>
  
  <p>Any recommendations on how I could go about this?</p>
  
Tags: <ev3><ev3dev>
Title: Controlling EV3 motors within VC++
UserDisplayName: Karoh
ThreadText: # Controlling EV3 motors within VC++
  
  (Asked by: username_0 on 2015-12-23)
  
  I've got an application within some VC++ software ([BCI2000](http://www.bci2000.org/wiki/index.php/Main_Page)). This is running on Windows 7. Although BCI2000 can run elsewhere, I'd like to stay on Windows.
  
  I've got an EV3 whose motors I'd like to manipulate within my existing application. I don't mind using bluetooth, wifi, or a wired connection, whatever is easiest.
  
  What would be the best way to go about doing this? I've read about [ev3ev](http://www.ev3dev.org/) and [ev3 sources](https://github.com/mindboards/ev3sources), both look feasible. I also stumbled upon [this post](http://exolete.com/controlling-lego-mindstorms-ev3-with-cpp/) detailing control of the motors using just xcode with nothing installed on the brick. That looks ideal to me but my attempts at just injecting that code into my VC++ project have persistent dependency failures that I'm trying to fix [here](https://bricks.stackexchange.com/questions/7132/how-do-i-add-the-lms2012-library-as-a-dependency-within-visual-studio).
  
  Any recommendations on how I could go about this?
  
  **Tags:** ev3, ev3dev
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-06-09. Score: 1 | Accepted answer
  
  You can run C++ programs directly on the EV3 ([Stackoverflow](https://stackoverflow.com/a/37702134/1257035)). An Eclipse plugin is also available.
  
  If you want to run the C++ program on Windows and connect to the EV3 remotely you can use [c4ev3](http://c4ev3.github.io)'s [ev3duder](http://github.com/c4ev3/ev3duder), to establish a connection to the device and then keep sending direct messages to the motors over that connection. Check out [`moveEv3.pl`](https://github.com/c4ev3/ev3duder/blob/master/moveEv3.pl) for an example.
  
  
  ---
  
  