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
Video tutorial on how control V-REP with Arduino+sensors
Re: Video tutorial on how control V-REP with Arduino+sensors
valeu zerokol! ;)
-
- Posts: 4
- Joined: 10 Mar 2015, 07:10
Re: Video tutorial on how control V-REP with Arduino+sensors
You use Windows for this project?
Re: Video tutorial on how control V-REP with Arduino+sensors
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
-
- Posts: 4
- Joined: 10 Mar 2015, 07:10
Re: Video tutorial on how control V-REP with Arduino+sensors
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
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
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