Skip to content

Commit 03853d8

Browse files
author
Federico Fissore
committed
Run new astyle formatter against all the examples
1 parent 638cef2 commit 03853d8

File tree

3 files changed

+33
-33
lines changed

3 files changed

+33
-33
lines changed
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11

2-
/*
2+
/*
33
Stepper Motor Control - one revolution
4-
5-
This program drives a unipolar or bipolar stepper motor.
4+
5+
This program drives a unipolar or bipolar stepper motor.
66
The motor is attached to digital pins 8 - 11 of the Arduino.
7-
7+
88
The motor should revolve one revolution in one direction, then
9-
one revolution in the other direction.
10-
11-
9+
one revolution in the other direction.
10+
11+
1212
Created 11 Mar. 2007
1313
Modified 30 Nov. 2009
1414
by Tom Igoe
15-
15+
1616
*/
1717

1818
#include <Stepper.h>
1919

2020
const int stepsPerRevolution = 200; // change this to fit the number of steps per revolution
21-
// for your motor
21+
// for your motor
2222

2323
// initialize the stepper library on pins 8 through 11:
24-
Stepper myStepper(stepsPerRevolution, 8,9,10,11);
24+
Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11);
2525

2626
void setup() {
2727
// set the speed at 60 rpm:
@@ -32,13 +32,13 @@ void setup() {
3232

3333
void loop() {
3434
// step one revolution in one direction:
35-
Serial.println("clockwise");
35+
Serial.println("clockwise");
3636
myStepper.step(stepsPerRevolution);
3737
delay(500);
38-
39-
// step one revolution in the other direction:
38+
39+
// step one revolution in the other direction:
4040
Serial.println("counterclockwise");
4141
myStepper.step(-stepsPerRevolution);
42-
delay(500);
42+
delay(500);
4343
}
4444

examples/stepper_oneStepAtATime/stepper_oneStepAtATime.ino

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11

2-
/*
2+
/*
33
Stepper Motor Control - one step at a time
4-
5-
This program drives a unipolar or bipolar stepper motor.
4+
5+
This program drives a unipolar or bipolar stepper motor.
66
The motor is attached to digital pins 8 - 11 of the Arduino.
7-
7+
88
The motor will step one step at a time, very slowly. You can use this to
99
test that you've got the four wires of your stepper wired to the correct
1010
pins. If wired correctly, all steps should be in the same direction.
11-
11+
1212
Use this also to count the number of steps per revolution of your motor,
1313
if you don't know it. Then plug that number into the oneRevolution
1414
example to see if you got it right.
15-
15+
1616
Created 30 Nov. 2009
1717
by Tom Igoe
18-
18+
1919
*/
2020

2121
#include <Stepper.h>
2222

2323
const int stepsPerRevolution = 200; // change this to fit the number of steps per revolution
24-
// for your motor
24+
// for your motor
2525

2626
// initialize the stepper library on pins 8 through 11:
27-
Stepper myStepper(stepsPerRevolution, 8,9,10,11);
27+
Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11);
2828

2929
int stepCount = 0; // number of steps the motor has taken
3030

examples/stepper_speedControl/stepper_speedControl.ino

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11

2-
/*
2+
/*
33
Stepper Motor Control - speed control
4-
5-
This program drives a unipolar or bipolar stepper motor.
4+
5+
This program drives a unipolar or bipolar stepper motor.
66
The motor is attached to digital pins 8 - 11 of the Arduino.
77
A potentiometer is connected to analog input 0.
8-
8+
99
The motor will rotate in a clockwise direction. The higher the potentiometer value,
10-
the faster the motor speed. Because setSpeed() sets the delay between steps,
10+
the faster the motor speed. Because setSpeed() sets the delay between steps,
1111
you may notice the motor is less responsive to changes in the sensor value at
1212
low speeds.
13-
13+
1414
Created 30 Nov. 2009
1515
Modified 28 Oct 2010
1616
by Tom Igoe
17-
17+
1818
*/
1919

2020
#include <Stepper.h>
@@ -24,7 +24,7 @@ const int stepsPerRevolution = 200; // change this to fit the number of steps p
2424

2525

2626
// initialize the stepper library on pins 8 through 11:
27-
Stepper myStepper(stepsPerRevolution, 8,9,10,11);
27+
Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11);
2828

2929
int stepCount = 0; // number of steps the motor has taken
3030

@@ -41,8 +41,8 @@ void loop() {
4141
if (motorSpeed > 0) {
4242
myStepper.setSpeed(motorSpeed);
4343
// step 1/100 of a revolution:
44-
myStepper.step(stepsPerRevolution/100);
45-
}
44+
myStepper.step(stepsPerRevolution / 100);
45+
}
4646
}
4747

4848

0 commit comments

Comments
 (0)