Need simple help for a new Arduino user (stepper coding)

hey I just want to make a stepper motor move.

I have this code.
#include <AFMotor.h>

AF_Stepper motor(48, 1);

void setup(10) {
Serial.begin(9600);
motor.setSpeed(10);
}

void loop(10) {
motor.step(100, FORWARD10, SINGLE);
motor.step(100, BACKWARD10, SINGLE);
}

and im getting this error message
sketch_aug03a:1: error: variable or field 'loop' declared void
sketch_aug03a:2: error: 'AF_Stepper' does not name a type
sketch_aug03a:4: error: variable or field 'setup' declared void
sketch_aug03a:9: error: variable or field 'loop' declared void

can anyone help?
I'm very new to this.

thank you for your time

james

I don't know too much about the stepper library but there shouldn't be numbers in the parenthesis after void setup and void loop. Read this,Arduino motor/stepper/servo control - How to use, link and modify the example code given at the end of the page. I hope that helps you :smiley:

#include <AFMotor.h>

AF_Stepper motor(48, 1);

void setup()
{
  Serial.begin(9600);   
  motor.setSpeed(10); 
}

void loop()
{
  motor.step(100, FORWARD, SINGLE);
  motor.step(100, BACKWARD, SINGLE);
}

This compiles for me. Where did those extra 10s come from in your code?