Skip to content

Commit a240b1c

Browse files
per1234cmaglie
authored andcommitted
Make the formatting of opening comments of built-in examples consistent
1 parent ef2d909 commit a240b1c

File tree

75 files changed

+298
-316
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+298
-316
lines changed

examples/01.Basics/AnalogReadSerial/AnalogReadSerial.ino

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
/*
22
AnalogReadSerial
3+
34
Reads an analog input on pin 0, prints the result to the Serial Monitor.
4-
Graphical representation is available using Serial Plotter (Tools > Serial Plotter menu)
5+
Graphical representation is available using Serial Plotter (Tools > Serial Plotter menu).
56
Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.
67
78
This example code is in the public domain.
9+
10+
http://www.arduino.cc/en/Tutorial/AnalogReadSerial
811
*/
912

1013
// the setup routine runs once when you press reset:

examples/01.Basics/Blink/Blink.ino

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
22
Blink
3+
34
Turns an LED on for one second, then off for one second, repeatedly.
45
56
Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
@@ -8,18 +9,17 @@
89
If you want to know what pin the on-board LED is connected to on your Arduino model, check
910
the Technical Specs of your board at https://www.arduino.cc/en/Main/Products
1011
11-
This example code is in the public domain.
12-
1312
modified 8 May 2014
1413
by Scott Fitzgerald
15-
1614
modified 2 Sep 2016
1715
by Arturo Guadalupi
18-
1916
modified 8 Sep 2016
2017
by Colby Newman
21-
*/
2218
19+
This example code is in the public domain.
20+
21+
http://www.arduino.cc/en/Tutorial/Blink
22+
*/
2323

2424
// the setup function runs once when you press reset or power the board
2525
void setup() {

examples/01.Basics/DigitalReadSerial/DigitalReadSerial.ino

+3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
/*
22
DigitalReadSerial
3+
34
Reads a digital input on pin 2, prints the result to the Serial Monitor
45
56
This example code is in the public domain.
7+
8+
http://www.arduino.cc/en/Tutorial/DigitalReadSerial
69
*/
710

811
// digital pin 2 has a pushbutton attached to it. Give it a name:

examples/01.Basics/Fade/Fade.ino

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
a "~" sign, like ~3, ~5, ~6, ~9, ~10 and ~11.
1212
1313
This example code is in the public domain.
14+
15+
http://www.arduino.cc/en/Tutorial/Fade
1416
*/
1517

1618
int led = 9; // the PWM pin the LED is attached to

examples/01.Basics/ReadAnalogVoltage/ReadAnalogVoltage.ino

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
/*
22
ReadAnalogVoltage
3+
34
Reads an analog input on pin 0, converts it to voltage, and prints the result to the Serial Monitor.
4-
Graphical representation is available using Serial Plotter (Tools > Serial Plotter menu)
5+
Graphical representation is available using Serial Plotter (Tools > Serial Plotter menu).
56
Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.
67
78
This example code is in the public domain.
9+
10+
http://www.arduino.cc/en/Tutorial/ReadAnalogVoltage
811
*/
912

1013
// the setup routine runs once when you press reset:

examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/* Blink without Delay
1+
/*
2+
Blink without Delay
23
34
Turns on and off a light emitting diode (LED) connected to a digital
45
pin, without using the delay() function. This means that other code
@@ -7,10 +8,10 @@
78
The circuit:
89
- Use the onboard LED.
910
- Note: Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
10-
it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
11-
the correct LED pin independent of which board is used.
12-
If you want to know what pin the on-board LED is connected to on your Arduino model, check
13-
the Technical Specs of your board at https://www.arduino.cc/en/Main/Products
11+
it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
12+
the correct LED pin independent of which board is used.
13+
If you want to know what pin the on-board LED is connected to on your Arduino model, check
14+
the Technical Specs of your board at https://www.arduino.cc/en/Main/Products
1415
1516
created 2005
1617
by David A. Mellis
@@ -21,7 +22,6 @@
2122
modified 9 Jan 2017
2223
by Arturo Guadalupi
2324
24-
2525
This example code is in the public domain.
2626
2727
http://www.arduino.cc/en/Tutorial/BlinkWithoutDelay

examples/02.Digital/Button/Button.ino

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@
44
Turns on and off a light emitting diode(LED) connected to digital
55
pin 13, when pressing a pushbutton attached to pin 2.
66
7-
87
The circuit:
98
- LED attached from pin 13 to ground
109
- pushbutton attached to pin 2 from +5V
1110
- 10K resistor attached to pin 2 from ground
1211
1312
- Note: on most Arduinos there is already an LED on the board
14-
attached to pin 13.
15-
13+
attached to pin 13.
1614
1715
created 2005
1816
by DojoDave <http://www.0j0.org>

examples/02.Digital/Debounce/Debounce.ino

+3-5
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@
99
The circuit:
1010
- LED attached from pin 13 to ground
1111
- pushbutton attached from pin 2 to +5V
12-
- 10K resistor attached from pin 2 to ground
12+
- 10 kilohm resistor attached from pin 2 to ground
1313
1414
- Note: On most Arduino boards, there is already an LED on the board
15-
connected to pin 13, so you don't need any extra components for this example.
15+
connected to pin 13, so you don't need any extra components for this example.
1616
17-
18-
created 21 November 2006
17+
created 21 Nov 2006
1918
by David A. Mellis
2019
modified 30 Aug 2011
2120
by Limor Fried
@@ -24,7 +23,6 @@
2423
modified 30 Aug 2016
2524
by Arturo Guadalupi
2625
27-
2826
This example code is in the public domain.
2927
3028
http://www.arduino.cc/en/Tutorial/Debounce

examples/02.Digital/DigitalInputPullup/DigitalInputPullup.ino

+5-6
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,19 @@
55
digital input on pin 2 and prints the results to the Serial Monitor.
66
77
The circuit:
8-
- Momentary switch attached from pin 2 to ground
9-
- Built-in LED on pin 13
8+
- momentary switch attached from pin 2 to ground
9+
- built-in LED on pin 13
1010
1111
Unlike pinMode(INPUT), there is no pull-down resistor necessary. An internal
1212
20K-ohm resistor is pulled to 5V. This configuration causes the input to
1313
read HIGH when the switch is open, and LOW when it is closed.
1414
15-
created 14 March 2012
15+
created 14 Mar 2012
1616
by Scott Fitzgerald
1717
18-
http://www.arduino.cc/en/Tutorial/InputPullupSerial
19-
20-
This example code is in the public domain
18+
This example code is in the public domain.
2119
20+
http://www.arduino.cc/en/Tutorial/InputPullupSerial
2221
*/
2322

2423
void setup() {

examples/02.Digital/StateChangeDetection/StateChangeDetection.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
1212
The circuit:
1313
- pushbutton attached to pin 2 from +5V
14-
- 10K resistor attached to pin 2 from ground
14+
- 10 kilohm resistor attached to pin 2 from ground
1515
- LED attached from pin 13 to ground (or use the built-in LED on
1616
most Arduino boards)
1717
@@ -22,7 +22,6 @@
2222
This example code is in the public domain.
2323
2424
http://www.arduino.cc/en/Tutorial/ButtonStateChange
25-
2625
*/
2726

2827
// this constant won't change:

examples/02.Digital/toneKeyboard/toneKeyboard.ino

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/*
2-
keyboard
2+
Keyboard
33
44
Plays a pitch that changes based on a changing analog input
55
66
circuit:
7-
- 3 force-sensing resistors from +5V to analog in 0 through 5
8-
- 3 10K resistors from analog in 0 through 5 to ground
9-
- 8-ohm speaker on digital pin 8
7+
- three force-sensing resistors from +5V to analog in 0 through 5
8+
- three 10 kilohm resistors from analog in 0 through 5 to ground
9+
- 8 ohm speaker on digital pin 8
1010
1111
created 21 Jan 2010
1212
modified 9 Apr 2012
@@ -15,7 +15,6 @@
1515
This example code is in the public domain.
1616
1717
http://www.arduino.cc/en/Tutorial/Tone3
18-
1918
*/
2019

2120
#include "pitches.h"

examples/02.Digital/toneMelody/toneMelody.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Plays a melody
55
66
circuit:
7-
- 8-ohm speaker on digital pin 8
7+
- 8 ohm speaker on digital pin 8
88
99
created 21 Jan 2010
1010
modified 30 Aug 2011
@@ -13,8 +13,8 @@
1313
This example code is in the public domain.
1414
1515
http://www.arduino.cc/en/Tutorial/Tone
16-
1716
*/
17+
1818
#include "pitches.h"
1919

2020
// notes in the melody:

examples/02.Digital/toneMultiple/toneMultiple.ino

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@
44
Plays multiple tones on multiple pins in sequence
55
66
circuit:
7-
- 3 8-ohm speaker on digital pins 6, 7, and 8
7+
- three 8 ohm speakers on digital pins 6, 7, and 8
88
9-
created 8 March 2010
9+
created 8 Mar 2010
1010
by Tom Igoe
1111
based on a snippet from Greg Borenstein
1212
1313
This example code is in the public domain.
1414
1515
http://www.arduino.cc/en/Tutorial/Tone4
16-
1716
*/
1817

1918
void setup() {

examples/02.Digital/tonePitchFollower/tonePitchFollower.ino

+2-4
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
Plays a pitch that changes based on a changing analog input
55
66
circuit:
7-
- 8-ohm speaker on digital pin 9
7+
- 8 ohm speaker on digital pin 9
88
- photoresistor on analog 0 to 5V
9-
- 4.7K resistor on analog 0 to ground
9+
- 4.7 kilohm resistor on analog 0 to ground
1010
1111
created 21 Jan 2010
1212
modified 31 May 2012
@@ -15,10 +15,8 @@
1515
This example code is in the public domain.
1616
1717
http://www.arduino.cc/en/Tutorial/Tone2
18-
1918
*/
2019

21-
2220
void setup() {
2321
// initialize serial communications (for debugging only):
2422
Serial.begin(9600);

examples/03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
1818
This example code is in the public domain.
1919
20+
http://www.arduino.cc/en/Tutorial/AnalogInOutSerial
2021
*/
2122

2223
// These constants won't change. They're used to give names

examples/03.Analog/AnalogInput/AnalogInput.ino

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
/*
22
Analog Input
3+
34
Demonstrates analog input by reading an analog sensor on analog pin 0 and
45
turning on and off a light emitting diode(LED) connected to digital pin 13.
56
The amount of time the LED will be on and off depends on
67
the value obtained by analogRead().
78
89
The circuit:
9-
- Potentiometer attached to analog input 0
10-
- center pin of the potentiometer to the analog pin
11-
- one side pin (either one) to ground
12-
- the other side pin to +5V
13-
- LED anode (long leg) attached to digital output 13
14-
- LED cathode (short leg) attached to ground
10+
- potentiometer
11+
center pin of the potentiometer to the analog input 0
12+
one side pin (either one) to ground
13+
the other side pin to +5V
14+
- LED
15+
anode (long leg) attached to digital output 13
16+
cathode (short leg) attached to ground
1517
1618
- Note: because most Arduinos have a built-in LED attached
17-
to pin 13 on the board, the LED is optional.
18-
19+
to pin 13 on the board, the LED is optional.
1920
20-
Created by David Cuartielles
21+
created by David Cuartielles
2122
modified 30 Aug 2011
2223
By Tom Igoe
2324
2425
This example code is in the public domain.
2526
2627
http://www.arduino.cc/en/Tutorial/AnalogInput
27-
2828
*/
2929

3030
int sensorPin = A0; // select the input pin for the potentiometer

examples/03.Analog/AnalogWriteMega/AnalogWriteMega.ino

+2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
1313
This example code is in the public domain.
1414
15+
http://www.arduino.cc/en/Tutorial/AnalogWriteMega
1516
*/
17+
1618
// These constants won't change. They're used to give names
1719
// to the pins used:
1820
const int lowestPin = 2;

examples/03.Analog/Calibration/Calibration.ino

+4-5
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,17 @@
1212
maximum low and listen for anything higher as the new maximum.
1313
1414
The circuit:
15-
- Analog sensor (potentiometer will do) attached to analog input 0
15+
- analog sensor (potentiometer will do) attached to analog input 0
1616
- LED attached from digital pin 9 to ground
1717
1818
created 29 Oct 2008
19-
By David A Mellis
19+
by David A Mellis
2020
modified 30 Aug 2011
21-
By Tom Igoe
22-
23-
http://www.arduino.cc/en/Tutorial/Calibration
21+
by Tom Igoe
2422
2523
This example code is in the public domain.
2624
25+
http://www.arduino.cc/en/Tutorial/Calibration
2726
*/
2827

2928
// These constants won't change:

examples/03.Analog/Fading/Fading.ino

+4-6
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,16 @@
66
The circuit:
77
- LED attached from digital pin 9 to ground.
88
9-
Created 1 Nov 2008
10-
By David A. Mellis
9+
created 1 Nov 2008
10+
by David A. Mellis
1111
modified 30 Aug 2011
12-
By Tom Igoe
13-
14-
http://www.arduino.cc/en/Tutorial/Fading
12+
by Tom Igoe
1513
1614
This example code is in the public domain.
1715
16+
http://www.arduino.cc/en/Tutorial/Fading
1817
*/
1918

20-
2119
int ledPin = 9; // LED connected to digital pin 9
2220

2321
void setup() {

0 commit comments

Comments
 (0)