ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Control DC Motor with arduino

asked 2016-03-18 06:16:31 -0600

Emilien gravatar image

I want to control DCMotor with arduino and ROS but i am beginning in programmation. can you give me example of code?

edit retag flag offensive close merge delete


did you solve this problem? ı have a dc motor with encoder .and ı want to communicate this with ros . please if you did it .tell me

Mekateng gravatar image Mekateng  ( 2017-10-29 15:19:02 -0600 )edit

3 Answers

Sort by » oldest newest most voted

answered 2016-03-21 07:53:02 -0600

I would take a look at the roboclaw, it is a little more expensive than the arduino but it will do everything you need including PID for velosicty and position with an auto tuner. I have a ROS driver for it.

edit flag offensive delete link more

answered 2016-03-20 13:29:14 -0600

HybridX gravatar image

If you know how to write code to control DC Motor in Arduino (which I am assuming you can) you can use these tutorials to understand how to integrate it with ROS.

edit flag offensive delete link more

answered 2016-03-18 19:06:10 -0600

jcardenasc93 gravatar image

It depends of your application, What kind of control do you want to apply? speed, direction, etc... However that kind of control over a DC motor it's more related to control circuits, I guess that the only control trough a ROS node with Arduino implementation is a On/Off control. Please give us more info about what exactly you want to do.

edit flag offensive delete link more


I want to make a robot with 2 wheels, but i want on first time just know how i control a dc motor ( on/off, speed)

Emilien gravatar image Emilien  ( 2016-03-19 02:44:06 -0600 )edit

Question Tools

1 follower


Asked: 2016-03-18 06:16:31 -0600

Seen: 4,833 times

Last updated: Mar 18 '16