How to send commands to arduino serial port from V-REP?

Typically: "How do I... ", "How can I... " questions
Post Reply
xiemzuo
Posts: 10
Joined: 29 Nov 2017, 01:52

How to send commands to arduino serial port from V-REP?

Post by xiemzuo »

Hello,
I made a project about Dobot. I built the scene in V-REP and implemented both forward and inverse kinematics.These are my scene diagrams and my scene .
Image
Image
https://1drv.ms/u/s!AmNQPbMfN-sCbtg39VWLGWWJSGM
I am for reference weldingRobot.ttt file to code.
And now,my goal is to achieve v-rep virtual scene control actual arm model.Via V-rep send commands to Arduino serial port for control the actual motor movement.
I am very unfamiliar v-rep serial port, but very little information about this.So can anyone give me some advice or can give me some Arduino related virtual reality control model and code
I will be very grateful.

Mingzuo

coppelia
Site Admin
Posts: 10336
Joined: 14 Dec 2012, 00:25

Re: How to send commands to arduino serial port from V-REP?

Post by coppelia »

Hello Mingzuo,

have a look at the example models other/Arduino Esplora.ttm and robots/mobile/K-junior.ttm, which both feature serial port communication. You can also use a different type of serial port mechanism, for example:
  • via a lua extension library, e.g. luars232
  • via a V-REP plugin that wraps your own serial port communication.
Cheers

xiemzuo
Posts: 10
Joined: 29 Nov 2017, 01:52

Re: How to send commands to arduino serial port from V-REP?

Post by xiemzuo »

Thank you for your reply.
I have read all these examples you recommend. But most of them are hardware instructions control Virtual objects in v-rep, few are V-rep sends commands to the serial port to control the real object .
Forgive me for a new, can you write a simple example for me that the v-rep sends commands to serial port for control Arduino board lights on or off ?other sensors also are very good.
Thank you very much.

Post Reply