step motor pan tilt rs485

I made 2 pcs stepper motor, arduino uno, l293d motor shield, 1 ip camera (rs485 support) all of them pan tilt camera. I connected the camera to tttl rs485 shield with arduno uno. But since it is not enough information, I want to tilt the screen from the screen as it is the support of the camera rs485 when connecting to the ip camera via tcp / ip and watching the image. I would like to send a rs485 command from ip camera and tilt pan to step motors connected to arduno uno.
I looked at the example in the cod but could not find it.

Image from Original Post so we don't have to download it. See this Image Guide

...R

[quote author=BYKZ13 link=msg=3105863 date=1485631321]
But since it is not enough information,

It sure isn't. Yours sounds like a complex project so you can't really expect us to understand it based on a 4-line description.

I looked at the example in the cod but could not find it.

As you have not posted the code I can't even see it.

Post a link to the datasheet for the IP Camera so we can find out what sort of data it sends. And if you can show us a few typical examples it will help greatly.

Can we assume that your Arduino is able to receive the data from the camera and display it on the Serial Monitor?

Have you been able to get your motors working with a simple test program?

Post a link to the datasheet for your stepper motors.

...R
Stepper Motor Basics
Simple Stepper Code

Picture I painted the projemin picture.
The project is over.
I am loading code

#include <AccelStepper.h>
#include <AFMotor.h>
AF_Stepper motor1(200, 2);
AF_Stepper motor2(200, 1);
void forwardstep1() {
motor1.onestep(FORWARD, SINGLE);
}
void backwardstep1() {
motor1.onestep(BACKWARD, SINGLE);
}
void forwardstep2() {
motor2.onestep(FORWARD, SINGLE);
}
void backwardstep2() {
motor2.onestep(BACKWARD, SINGLE);
}
AccelStepper stepper1(forwardstep1, backwardstep1);
AccelStepper stepper2(forwardstep2, backwardstep2);
void setup()
{

Available cod.
I need cod for rs485.

#include <AccelStepper.h>
#include <AFMotor.h>
AF_Stepper motor1(200, 2);
AF_Stepper motor2(200, 1);
void forwardstep1() {
motor1.onestep(FORWARD, SINGLE);
}
void backwardstep1() {
motor1.onestep(BACKWARD, SINGLE);
}
void forwardstep2() {
motor2.onestep(FORWARD, SINGLE);
}
void backwardstep2() {
motor2.onestep(BACKWARD, SINGLE);
}
AccelStepper stepper1(forwardstep1, backwardstep1);
AccelStepper stepper2(forwardstep2, backwardstep2);
void setup()
{

Your code is incomplete.
It lacks code tags.
Please post the error messages (if any)

iYou need to send rs485 command from rope camer and a code example to move 2 stepper motors in arduino uno.

#include <AccelStepper.h>
#include <AFMotor.h>
AF_Stepper motor1(200, 2);
AF_Stepper motor2(200, 1);
void forwardstep1() {
motor1.onestep(FORWARD, SINGLE);
}
void backwardstep1() {
motor1.onestep(BACKWARD, SINGLE);
}
void forwardstep2() {
motor2.onestep(FORWARD, SINGLE);
}
void backwardstep2() {
motor2.onestep(BACKWARD, SINGLE);
}
AccelStepper stepper1(forwardstep1, backwardstep1);
AccelStepper stepper2(forwardstep2, backwardstep2);
void setup()
{
Serial.begin(9600);

int revs1, revs2, RPM1, RPM2;
//input revoultions(for motor1 and motor2) and RPMs below:
//for negative rotation enter a negative revolution
revs1 = -2;
revs2 = 1;
RPM1 = 60;
RPM2 = 60;

stepper1.setMaxSpeed(1000);
stepper2.setMaxSpeed(1000);
stepper1.moveTo((revs1200)-3);
stepper1.setSpeed(RPM1 * 3.75);
stepper2.moveTo((revs2
200)+3);
stepper2.setSpeed(RPM2 * 3.75);
}
void loop()
{
if ((stepper1.distanceToGo()) != 0)
{
stepper1.runSpeedToPosition();
}
else{
motor1.release();
}
if ((stepper2.distanceToGo()) != 0)
{
stepper2.runSpeedToPosition();
}
else{
motor2.release();
}
}

You really need to start using code tags

@BYKZ13, please modify your post and use the code button </> so your code looks like this and is easy to copy to a text editor. See How to use the Forum Your code is too long for me to study quickly without copying to a text editor.

ALSO please answer the questions in Reply #2

...R