Jump to content


Photo

Arduino Programming

arduino robot

  • Please log in to reply
1 reply to this topic

#1 mukhlis1010

mukhlis1010

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 16 June 2015 - 06:37 AM

Hi... buddy, can you help how to combine motor driver programming, ultrasonic sensor, and servo. Motor driver I use 'L293D'? I'm the beginner that's why I need your help of this robot project!  plz...responding! Thnks.....(Y)

 

Actually, I've tried using your code on "how to make your first arduino robot" programming. because I use

dual dc motors, just servo got contact but  unfortunately the motors are motionless, not got effect to move!!  yeah, that's it...


  • 0

#2 Nathan House

Nathan House

    Administrator

  • Administrators
  • 122 posts
  • LocationLynchburg, VA

Posted 16 June 2015 - 05:18 PM

Well, the best way to debug a programming problem is to break down the program and test the individual components separately.

 

So, to start, try making a sketch with only the code needed to make the motors turn. Something like (pseudocode):

 

turn motors forward

delay for two seconds

turn motors backwards

delay for two seconds

stop motors

 

Once you have that code working, then you can make a program to test the ultrasonic sensor. Once that's working, you can then combine the two programs.

 

Does that make sense?

 

Try making the motor code, and if it doesn't work feel free to post your code here and I'll take a look.


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users