Page 1 of 1

Video tutorial on how control V-REP with Arduino+sensors

Posted: 03 Mar 2014, 22:51
by Eric
Arduino + compass+ PSD sensor +V-REP simulation

This is a simple video tutorial to show how to control a V-REP simulation through a serial port, with an Arduino Mega 2560, collecting heading data from a magnetic compass HMC6352 and the distance to an obstacle with a Sharp GP2D12 PSD sensor. You can easily change the sensors by other devices like potentiometers (to make a joystick) or other sensors and adapt the code in both the Arduino and the simulation script.

We can push and rotate (Jedi style ;) ) the cube inside the V-REP simulation.

You can download the V-REP scene including the cube and the control code, along with the Arduino code to read the sensors, and prepare their values to be sent to the serial port toward the simulation here

http://youtu.be/ZJQV2FlGFBo

Re: Video tutorial on how control V-REP with Arduino+sensors

Posted: 25 Mar 2014, 15:05
by zerokol
Very Cool!

Re: Video tutorial on how control V-REP with Arduino+sensors

Posted: 25 Mar 2014, 21:03
by Eric
valeu zerokol! ;)

Re: Video tutorial on how control V-REP with Arduino+sensors

Posted: 06 Jul 2015, 17:07
by oxsygiandi
You use Windows for this project?

Re: Video tutorial on how control V-REP with Arduino+sensors

Posted: 06 Jul 2015, 18:28
by Eric
Yes, but I don t see why it would not work on a linux or macOS machine. You would have to adjust the portNumber variable

Re: Video tutorial on how control V-REP with Arduino+sensors

Posted: 07 Jul 2015, 03:33
by oxsygiandi
Could you tell me how to install or Connect Matlab to V-rep in Windows?? Any tutorial and the video?

Re: Video tutorial on how control V-REP with Arduino+sensors

Posted: 07 Jul 2015, 10:55
by coppelia
As already mentioned in one of your other posts, you will have to use the remote API. Check also for the example programs located in programming/remoteApiBindings/matlab/matlab, e.g. simpleTest.m.

But basically, you always need to connect to a remote API server service. By default, one is running on port 19997. But you can start your own if you read the instructions here.

On the client side, i.e. Matlab, make sure to fullfil the conditions mentioned here.

Cheers