needle sweep

hello

I am a beginner and search software for needle sweep for my car
I have a basic program and works continuously.
it must be adjusted so switched as voltage on pin 2 that the needle
1 booking sweep.
Who can help me?

/*
Stepper Motor Control - one revolution

This program drives a bipolar stepper motor.
The motor is attached to digital pins 3 - 6 of the Arduino.

The motor should revolve one revolution in one direction, then
one revolution in the other direction.

*/

#include <Stepper.h>

const int stepsPerRevolution = 420; // change this to fit the number of steps per revolution
// for your motor

// initialize the stepper library on pins3 through 6:
Stepper myStepper(stepsPerRevolution, 6, 5, 4,3);

void setup() {
// set the speed at 65 rpm:
myStepper.setSpeed(65);
// initialize the serial port:
Serial.begin(9600);
}

void loop() {
// step one revolution in one direction:
Serial.println("clockwise");
myStepper.step(stepsPerRevolution);
delay(500);

// step one revolution in the other direction:
Serial.println("counterclockwise");
myStepper.step(-stepsPerRevolution);
delay(500);
}

it must be adjusted so switched as voltage on pin 2 that the needle
1 booking sweep.

Looks like Google Translate barfed on that.
Have you tried the Netherlands section of the forum?

sorry my english is not so good
I look on the Nedelands site to

henk

To make a stepper motor track a value:

  • if the steeper motor is not ready to make another step (less than 2000 m icroseconds or whtever), do nothing
  • otherwise
    ** work out where the stepper should be
    ** if the stepper motor position is less tn where it should be, increment the stepper motor position
    ** if the stepper motor position is greater than where it should be, decrement the stepper motor position