Skip to content

Commit 2570383

Browse files
per1234cmaglie
authored andcommitted
Use a consistent number of spaces after punctuation in the comments of the built-in examples
1 parent e3044a5 commit 2570383

File tree

21 files changed

+43
-43
lines changed

21 files changed

+43
-43
lines changed

build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Blink without Delay
33
44
Turns on and off a light emitting diode (LED) connected to a digital
5-
pin, without using the delay() function. This means that other code
5+
pin, without using the delay() function. This means that other code
66
can run at the same time without being interrupted by the LED code.
77
88
The circuit:

build/shared/examples/02.Digital/Debounce/Debounce.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Debounce
33
44
Each time the input pin goes from LOW to HIGH (e.g. because of a push-button
5-
press), the output pin is toggled from LOW to HIGH or HIGH to LOW. There's
5+
press), the output pin is toggled from LOW to HIGH or HIGH to LOW. There's
66
a minimum delay between toggles to debounce the circuit (i.e. to ignore
77
noise).
88
@@ -83,7 +83,7 @@ void loop() {
8383
// set the LED:
8484
digitalWrite(ledPin, ledState);
8585

86-
// save the reading. Next time through the loop,
86+
// save the reading. Next time through the loop,
8787
// it'll be the lastButtonState:
8888
lastButtonState = reading;
8989
}

build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
Often, you don't need to know the state of a digital input all the time,
55
but you just need to know when the input changes from one state to another.
6-
For example, you want to know when a button goes from OFF to ON. This is called
6+
For example, you want to know when a button goes from OFF to ON. This is called
77
state change detection, or edge detection.
88
99
This example shows how to detect when a button or button changes from off to on
@@ -55,7 +55,7 @@ void loop() {
5555
// went from off to on:
5656
buttonPushCounter++;
5757
Serial.println("on");
58-
Serial.print("number of button pushes: ");
58+
Serial.print("number of button pushes: ");
5959
Serial.println(buttonPushCounter);
6060
} else {
6161
// if the current state is LOW then the button

build/shared/examples/03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
http://www.arduino.cc/en/Tutorial/AnalogInOutSerial
2121
*/
2222

23-
// These constants won't change. They're used to give names
23+
// These constants won't change. They're used to give names
2424
// to the pins used:
2525
const int analogInPin = A0; // Analog input pin that the potentiometer is attached to
2626
const int analogOutPin = 9; // Analog output pin that the LED is attached to

build/shared/examples/03.Analog/AnalogWriteMega/AnalogWriteMega.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
http://www.arduino.cc/en/Tutorial/AnalogWriteMega
1616
*/
1717

18-
// These constants won't change. They're used to give names
18+
// These constants won't change. They're used to give names
1919
// to the pins used:
2020
const int lowestPin = 2;
2121
const int highestPin = 13;

build/shared/examples/03.Analog/Calibration/Calibration.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Calibration
33
4-
Demonstrates one technique for calibrating sensor input. The
4+
Demonstrates one technique for calibrating sensor input. The
55
sensor readings during the first five seconds of the sketch
66
execution define the minimum and maximum of expected values
77
attached to the sensor pin.

build/shared/examples/03.Analog/Smoothing/Smoothing.ino

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Smoothing
33
44
Reads repeatedly from an analog input, calculating a running average
5-
and printing it to the computer. Keeps ten readings in an array and
5+
and printing it to the computer. Keeps ten readings in an array and
66
continually averages them.
77
88
The circuit:
@@ -18,9 +18,9 @@
1818
http://www.arduino.cc/en/Tutorial/Smoothing
1919
*/
2020

21-
// Define the number of samples to keep track of. The higher the number,
21+
// Define the number of samples to keep track of. The higher the number,
2222
// the more the readings will be smoothed, but the slower the output will
23-
// respond to the input. Using a constant rather than a normal variable lets
23+
// respond to the input. Using a constant rather than a normal variable lets
2424
// us use this value to determine the size of the readings array.
2525
const int numReadings = 10;
2626

build/shared/examples/04.Communication/ASCIITable/ASCIITable.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
88
For more on ASCII, see http://www.asciitable.com and http://en.wikipedia.org/wiki/ASCII
99
10-
The circuit: No external hardware needed.
10+
The circuit: No external hardware needed.
1111
1212
created 2006
1313
by Nicholas Zambetti <http://www.zambetti.com>
@@ -39,7 +39,7 @@ int thisByte = 33;
3939
void loop() {
4040
// prints value unaltered, i.e. the raw binary version of the
4141
// byte. The Serial Monitor interprets all bytes as
42-
// ASCII, so 33, the first number, will show up as '!'
42+
// ASCII, so 33, the first number, will show up as '!'
4343
Serial.write(thisByte);
4444

4545
Serial.print(", dec: ");

build/shared/examples/04.Communication/Dimmer/Dimmer.ino

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
Dimmer
33
44
Demonstrates sending data from the computer to the Arduino board,
5-
in this case to control the brightness of an LED. The data is sent
6-
in individual bytes, each of which ranges from 0 to 255. Arduino
5+
in this case to control the brightness of an LED. The data is sent
6+
in individual bytes, each of which ranges from 0 to 255. Arduino
77
reads these bytes and uses them to set the brightness of the LED.
88
99
The circuit:
@@ -56,9 +56,9 @@ void loop() {
5656
// if using Processing 2.1 or later, use Serial.printArray()
5757
println(Serial.list());
5858
59-
// Uses the first port in this list (number 0). Change this to
60-
// select the port corresponding to your Arduino board. The last
61-
// parameter (e.g. 9600) is the speed of the communication. It
59+
// Uses the first port in this list (number 0). Change this to
60+
// select the port corresponding to your Arduino board. The last
61+
// parameter (e.g. 9600) is the speed of the communication. It
6262
// has to correspond to the value passed to Serial.begin() in your
6363
// Arduino sketch.
6464
port = new Serial(this, Serial.list()[0], 9600);

build/shared/examples/04.Communication/Graph/Graph.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
Graph
33
44
A simple example of communication from the Arduino board to the computer:
5-
the value of analog input 0 is sent out the serial port. We call this "serial"
5+
the value of analog input 0 is sent out the serial port. We call this "serial"
66
communication because the connection appears to both the Arduino and the
77
computer as a serial port, even though it may actually use
88
a USB cable. Bytes are sent one after another (serially) from the Arduino
99
to the computer.
1010
1111
You can use the Arduino Serial Monitor to view the sent data, or it can
1212
be read by Processing, PD, Max/MSP, or any other program capable of reading
13-
data from a serial port. The Processing code below graphs the data received
13+
data from a serial port. The Processing code below graphs the data received
1414
so you can see the value of the analog input changing over time.
1515
1616
The circuit:

build/shared/examples/04.Communication/Midi/Midi.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ void loop() {
3737
}
3838
}
3939

40-
// plays a MIDI note. Doesn't check to see that
40+
// plays a MIDI note. Doesn't check to see that
4141
// cmd is greater than 127, or that data values are less than 127:
4242
void noteOn(int cmd, int pitch, int velocity) {
4343
Serial.write(cmd);

build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Physical Pixel
33
44
An example of using the Arduino board to receive data from the
5-
computer. In this case, the Arduino boards turns on an LED when
5+
computer. In this case, the Arduino boards turns on an LED when
66
it receives the character 'H', and turns off the LED when it
77
receives the character 'L'.
88

build/shared/examples/04.Communication/SerialEvent/SerialEvent.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ void loop() {
4141

4242
/*
4343
SerialEvent occurs whenever a new data comes in the
44-
hardware serial RX. This routine is run between each
44+
hardware serial RX. This routine is run between each
4545
time loop() runs, so using delay inside loop can delay
46-
response. Multiple bytes of data may be available.
46+
response. Multiple bytes of data may be available.
4747
*/
4848
void serialEvent() {
4949
while (Serial.available()) {

build/shared/examples/05.Control/switchCase/switchCase.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/*
22
Switch statement
33
4-
Demonstrates the use of a switch statement. The switch
4+
Demonstrates the use of a switch statement. The switch
55
statement allows you to choose from among a set of discrete values
6-
of a variable. It's like a series of if statements.
6+
of a variable. It's like a series of if statements.
77
88
To see this sketch in action, put the board and sensor in a well-lit
99
room, open the Serial Monitor, and move your hand gradually down

build/shared/examples/05.Control/switchCase2/switchCase2.ino

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/*
22
Switch statement with serial input
33
4-
Demonstrates the use of a switch statement. The switch
4+
Demonstrates the use of a switch statement. The switch
55
statement allows you to choose from among a set of discrete values
6-
of a variable. It's like a series of if statements.
6+
of a variable. It's like a series of if statements.
77
88
To see this sketch in action, open the Serial monitor and send any character.
9-
The characters a, b, c, d, and e, will turn on LEDs. Any other character will turn
9+
The characters a, b, c, d, and e, will turn on LEDs. Any other character will turn
1010
the LEDs off.
1111
1212
The circuit:
@@ -36,7 +36,7 @@ void loop() {
3636
// do something different depending on the character received.
3737
// The switch statement expects single number values for each case;
3838
// in this example, though, you're using single quotes to tell
39-
// the controller to get the ASCII value for the character. For
39+
// the controller to get the ASCII value for the character. For
4040
// example 'a' = 97, 'b' = 98, and so forth:
4141

4242
switch (inByte) {

build/shared/examples/06.Sensors/ADXL3xx/ADXL3xx.ino

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
ADXL3xx
33
44
Reads an Analog Devices ADXL3xx accelerometer and communicates the
5-
acceleration to the computer. The pins used are designed to be easily
5+
acceleration to the computer. The pins used are designed to be easily
66
compatible with the breakout boards from SparkFun, available from:
77
http://www.sparkfun.com/commerce/categories.php?c=80
88
@@ -36,8 +36,8 @@ void setup() {
3636
Serial.begin(9600);
3737

3838
// Provide ground and power by using the analog inputs as normal
39-
// digital pins. This makes it possible to directly connect the
40-
// breakout board to the Arduino. If you use the normal 5V and
39+
// digital pins. This makes it possible to directly connect the
40+
// breakout board to the Arduino. If you use the normal 5V and
4141
// GND pins on the Arduino, you can remove these lines.
4242
pinMode(groundpin, OUTPUT);
4343
pinMode(powerpin, OUTPUT);

build/shared/examples/06.Sensors/Memsic2125/Memsic2125.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Memsic2125
33
4-
Read the Memsic 2125 two-axis accelerometer. Converts the
4+
Read the Memsic 2125 two-axis accelerometer. Converts the
55
pulses output by the 2125 into milli-g's (1/1000 of Earth's
66
gravity) and prints them over the serial connection to the
77
computer.

build/shared/examples/06.Sensors/Ping/Ping.ino

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
This sketch reads a PING))) ultrasonic rangefinder and returns the
55
distance to the closest object in range. To do this, it sends a pulse
66
to the sensor to initiate a reading, then listens for a pulse
7-
to return. The length of the returning pulse is proportional to
7+
to return. The length of the returning pulse is proportional to
88
the distance of the object from the sensor.
99
1010
The circuit:
@@ -22,7 +22,7 @@
2222
http://www.arduino.cc/en/Tutorial/Ping
2323
*/
2424

25-
// this constant won't change. It's the pin number
25+
// this constant won't change. It's the pin number
2626
// of the sensor's output:
2727
const int pingPin = 7;
2828

@@ -67,7 +67,7 @@ void loop() {
6767
long microsecondsToInches(long microseconds) {
6868
// According to Parallax's datasheet for the PING))), there are
6969
// 73.746 microseconds per inch (i.e. sound travels at 1130 feet per
70-
// second). This gives the distance travelled by the ping, outbound
70+
// second). This gives the distance travelled by the ping, outbound
7171
// and return, so we divide by 2 to get the distance of the obstacle.
7272
// See: http://www.parallax.com/dl/docs/prod/acc/28015-PING-v1.3.pdf
7373
return microseconds / 74 / 2;

build/shared/examples/09.USB/KeyboardAndMouseControl/KeyboardAndMouseControl.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
The mouse movement is always relative. This sketch reads
1010
four pushbuttons, and uses them to set the movement of the mouse.
1111
12-
WARNING: When you use the Mouse.move() command, the Arduino takes
13-
over your mouse! Make sure you have control before you use the mouse commands.
12+
WARNING: When you use the Mouse.move() command, the Arduino takes
13+
over your mouse! Make sure you have control before you use the mouse commands.
1414
1515
created 15 Mar 2012
1616
modified 27 Mar 2012

build/shared/examples/09.USB/Mouse/ButtonMouseControl/ButtonMouseControl.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
The mouse movement is always relative. This sketch reads
1212
four pushbuttons, and uses them to set the movement of the mouse.
1313
14-
WARNING: When you use the Mouse.move() command, the Arduino takes
15-
over your mouse! Make sure you have control before you use the mouse commands.
14+
WARNING: When you use the Mouse.move() command, the Arduino takes
15+
over your mouse! Make sure you have control before you use the mouse commands.
1616
1717
created 15 Mar 2012
1818
modified 27 Mar 2012

build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
The sketch assumes that the joystick resting values are around the
1616
middle of the range, but that they vary within a threshold.
1717
18-
WARNING: When you use the Mouse.move() command, the Arduino takes
19-
over your mouse! Make sure you have control before you use the command.
18+
WARNING: When you use the Mouse.move() command, the Arduino takes
19+
over your mouse! Make sure you have control before you use the command.
2020
This sketch includes a pushbutton to toggle the mouse control state, so
2121
you can turn on and off mouse control.
2222

0 commit comments

Comments
 (0)