Go Down

Topic: Links (Read 573 times) previous topic - next topic

destrower

Good morning, I am developing a small project using this kit here, http://dx.com/p/multi-function-4wd-arduino-robot-raider-car-kits-128715. However even found a source code designed to run with it, http://pastebin.com/4jGZ6fpJ, but however I'm not accomplishing the links correctly, so that the project work, someone who has knowledge in programming please tell me what connections should I make for it to work properly the project.
Thank you for your attention.

majenko

The source code details the pins that should be used for which function.

However, looking at the numbers used, it looks like that source code is meant for the Arduino MEGA, not he Arduino UNO.  You will need to modify the pin numbers for the ping sensors to work with the UNO.

The pins you should use are up to you, just make sure they match the code.

This is the bit that defines which pins to use for the ping sensors:

Code: [Select]

#define  TRIGGER_PIN  47
#define  ECHO_PIN_RIGHT  53
#define  ECHO_PIN_CENTER  51
#define  ECHO_PIN_LEFT 49


The motors are connected up using these pins:

Code: [Select]

//-- MOTOR A --
int ENA=5; //Connected to Arudino Pin 5(pwm)
int IN1=2; //Connected to Arudino Pin 2
int IN2=3; //Connected to Arudino Pin 3

//-- MOTOR B --
int IN3=4; //Connected to Arudino Pin 4
int IN4=7; //Connected to Arudino Pin 7
int ENB=6; //Connected to Arudino Pin 6(pwm)

destrower

Thanks for listening, I'm using Mega development project, I have doubts about the connection Sensor (HC-SR 04) and servant, which are connected to a sensor shield 4.0. Could you tell me how to connect the sensor to the Mega, and what the pinout for the servo work on this project.

Go Up