Skip to content

Commit ef2d909

Browse files
per1234cmaglie
authored andcommitted
Auto Format all built-in examples
The only changes I left out are the Max/MSP patches because I don't know whether the indentation would break them.
1 parent b830a93 commit ef2d909

File tree

72 files changed

+125
-125
lines changed

Some content is hidden

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

72 files changed

+125
-125
lines changed

examples/01.Basics/Blink/Blink.ino

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
Blink
33
Turns an LED on for one second, then off for one second, repeatedly.
44
5-
Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
5+
Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
66
it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
77
the correct LED pin independent of which board is used.
88
If you want to know what pin the on-board LED is connected to on your Arduino model, check
99
the Technical Specs of your board at https://www.arduino.cc/en/Main/Products
10-
10+
1111
This example code is in the public domain.
1212
1313
modified 8 May 2014
1414
by Scott Fitzgerald
15-
15+
1616
modified 2 Sep 2016
1717
by Arturo Guadalupi
18-
18+
1919
modified 8 Sep 2016
2020
by Colby Newman
2121
*/

examples/01.Basics/DigitalReadSerial/DigitalReadSerial.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Reads a digital input on pin 2, prints the result to the Serial Monitor
44
55
This example code is in the public domain.
6-
*/
6+
*/
77

88
// digital pin 2 has a pushbutton attached to it. Give it a name:
99
int pushButton = 2;

examples/01.Basics/Fade/Fade.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
The analogWrite() function uses PWM, so if
88
you want to change the pin you're using, be
99
sure to use another PWM capable pin. On most
10-
Arduino, the PWM pins are identified with
10+
Arduino, the PWM pins are identified with
1111
a "~" sign, like ~3, ~5, ~6, ~9, ~10 and ~11.
1212
1313
This example code is in the public domain.
14-
*/
14+
*/
1515

1616
int led = 9; // the PWM pin the LED is attached to
1717
int brightness = 0; // how bright the LED is

examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
77
The circuit:
88
- Use the onboard LED.
9-
- Note: Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
9+
- Note: Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
1010
it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
1111
the correct LED pin independent of which board is used.
1212
If you want to know what pin the on-board LED is connected to on your Arduino model, check
@@ -25,7 +25,7 @@
2525
This example code is in the public domain.
2626
2727
http://www.arduino.cc/en/Tutorial/BlinkWithoutDelay
28-
*/
28+
*/
2929

3030
// constants won't change. Used here to set a pin number:
3131
const int ledPin = LED_BUILTIN;// the number of the LED pin

examples/02.Digital/Button/Button.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
This example code is in the public domain.
2323
2424
http://www.arduino.cc/en/Tutorial/Button
25-
*/
25+
*/
2626

2727
// constants won't change. They're used here to
2828
// set pin numbers:

examples/02.Digital/Debounce/Debounce.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
This example code is in the public domain.
2929
3030
http://www.arduino.cc/en/Tutorial/Debounce
31-
*/
31+
*/
3232

3333
// constants won't change. They're used here to
3434
// set pin numbers:

examples/02.Digital/DigitalInputPullup/DigitalInputPullup.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
2020
This example code is in the public domain
2121
22-
*/
22+
*/
2323

2424
void setup() {
2525
//start serial connection

examples/02.Digital/StateChangeDetection/StateChangeDetection.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
2424
http://www.arduino.cc/en/Tutorial/ButtonStateChange
2525
26-
*/
26+
*/
2727

2828
// this constant won't change:
2929
const int buttonPin = 2; // the pin that the pushbutton is attached to

examples/02.Digital/toneKeyboard/toneKeyboard.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
1717
http://www.arduino.cc/en/Tutorial/Tone3
1818
19-
*/
19+
*/
2020

2121
#include "pitches.h"
2222

examples/02.Digital/toneMelody/toneMelody.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
1515
http://www.arduino.cc/en/Tutorial/Tone
1616
17-
*/
17+
*/
1818
#include "pitches.h"
1919

2020
// notes in the melody:

examples/02.Digital/toneMultiple/toneMultiple.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
1515
http://www.arduino.cc/en/Tutorial/Tone4
1616
17-
*/
17+
*/
1818

1919
void setup() {
2020

examples/02.Digital/tonePitchFollower/tonePitchFollower.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
1717
http://www.arduino.cc/en/Tutorial/Tone2
1818
19-
*/
19+
*/
2020

2121

2222
void setup() {

examples/03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
1818
This example code is in the public domain.
1919
20-
*/
20+
*/
2121

2222
// These constants won't change. They're used to give names
2323
// to the pins used:

examples/03.Analog/AnalogInput/AnalogInput.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
2626
http://www.arduino.cc/en/Tutorial/AnalogInput
2727
28-
*/
28+
*/
2929

3030
int sensorPin = A0; // select the input pin for the potentiometer
3131
int ledPin = 13; // select the pin for the LED

examples/03.Analog/AnalogWriteMega/AnalogWriteMega.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
1313
This example code is in the public domain.
1414
15-
*/
15+
*/
1616
// These constants won't change. They're used to give names
1717
// to the pins used:
1818
const int lowestPin = 2;

examples/03.Analog/Calibration/Calibration.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
2525
This example code is in the public domain.
2626
27-
*/
27+
*/
2828

2929
// These constants won't change:
3030
const int sensorPin = A0; // pin that the sensor is attached to

examples/03.Analog/Fading/Fading.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
1616
This example code is in the public domain.
1717
18-
*/
18+
*/
1919

2020

2121
int ledPin = 9; // LED connected to digital pin 9

examples/04.Communication/ASCIITable/ASCIITable.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
1919
<http://www.zambetti.com>
2020
21-
*/
21+
*/
2222
void setup() {
2323
//Initialize serial and wait for port to open:
2424
Serial.begin(9600);

examples/04.Communication/Dimmer/Dimmer.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
2020
http://www.arduino.cc/en/Tutorial/Dimmer
2121
22-
*/
22+
*/
2323

2424
const int ledPin = 9; // the pin that the LED is attached to
2525

@@ -80,7 +80,7 @@ void loop() {
8080
// a single byte
8181
port.write(mouseX);
8282
}
83-
*/
83+
*/
8484

8585
/* Max/MSP v5 patch for this example
8686

examples/04.Communication/Graph/Graph.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
This example code is in the public domain.
2525
2626
http://www.arduino.cc/en/Tutorial/Graph
27-
*/
27+
*/
2828

2929
void setup() {
3030
// initialize the serial communication:

examples/04.Communication/Midi/Midi.ino

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

2525
void setup() {
2626
// Set MIDI baud rate:

examples/04.Communication/MultiSerial/MultiSerial.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
1919
This example code is in the public domain.
2020
21-
*/
21+
*/
2222

2323

2424
void setup() {

examples/04.Communication/PhysicalPixel/PhysicalPixel.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
This example code is in the public domain.
2222
2323
http://www.arduino.cc/en/Tutorial/PhysicalPixel
24-
*/
24+
*/
2525

2626
const int ledPin = 13; // the pin that the LED is attached to
2727
int incomingByte; // a variable to read incoming serial data into
@@ -121,7 +121,7 @@ void loop() {
121121
}
122122
123123
124-
*/
124+
*/
125125

126126
/*
127127
Max/MSP version 5 patch to run with this example:

examples/04.Communication/ReadASCIIString/ReadASCIIString.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
1414
created 13 Apr 2012
1515
by Tom Igoe
16-
16+
1717
modified 14 Mar 2016
1818
by Arturo Guadalupi
1919
2020
This example code is in the public domain.
21-
*/
21+
*/
2222

2323
// pins for the LEDs:
2424
const int redPin = 3;

examples/04.Communication/SerialCallResponse/SerialCallResponse.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
2323
http://www.arduino.cc/en/Tutorial/SerialCallResponse
2424
25-
*/
25+
*/
2626

2727
int firstSensor = 0; // first analog sensor
2828
int secondSensor = 0; // second analog sensor

examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
2727
http://www.arduino.cc/en/Tutorial/SerialCallResponseASCII
2828
29-
*/
29+
*/
3030

3131
int firstSensor = 0; // first analog sensor
3232
int secondSensor = 0; // second analog sensor

examples/04.Communication/SerialEvent/SerialEvent.ino

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
1111
NOTE: The serialEvent() feature is not available on the
1212
Leonardo, Micro, or other ATmega32U4 based boards.
13-
13+
1414
Created 9 May 2011
1515
by Tom Igoe
1616
1717
This example code is in the public domain.
1818
1919
http://www.arduino.cc/en/Tutorial/SerialEvent
2020
21-
*/
21+
*/
2222

2323
String inputString = ""; // a String to hold incoming data
2424
boolean stringComplete = false; // whether the string is complete
@@ -45,7 +45,7 @@ void loop() {
4545
hardware serial RX. This routine is run between each
4646
time loop() runs, so using delay inside loop can delay
4747
response. Multiple bytes of data may be available.
48-
*/
48+
*/
4949
void serialEvent() {
5050
while (Serial.available()) {
5151
// get the new byte:

examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
by Tom Igoe and Scott Fitzgerald
1515
1616
This example code is in the public domain.
17-
*/
17+
*/
1818

1919
const int redPin = A0; // sensor to control red color
2020
const int greenPin = A1; // sensor to control green color
@@ -86,7 +86,7 @@ void loop() {
8686
}
8787
}
8888
89-
*/
89+
*/
9090

9191
/* Max/MSP patch for this example
9292

examples/05.Control/Arrays/Arrays.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
This example code is in the public domain.
2020
2121
http://www.arduino.cc/en/Tutorial/Array
22-
*/
22+
*/
2323

2424
int timer = 100; // The higher the number, the slower the timing.
2525
int ledPins[] = {

examples/05.Control/ForLoopIteration/ForLoopIteration.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
This example code is in the public domain.
1616
1717
http://www.arduino.cc/en/Tutorial/ForLoop
18-
*/
18+
*/
1919

2020
int timer = 100; // The higher the number, the slower the timing.
2121

examples/05.Control/IfStatementConditional/IfStatementConditional.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
2424
http://www.arduino.cc/en/Tutorial/IfStatement
2525
26-
*/
26+
*/
2727

2828
// These constants won't change:
2929
const int analogPin = A0; // pin that the sensor is attached to

examples/05.Control/WhileStatementConditional/WhileStatementConditional.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
2727
http://www.arduino.cc/en/Tutorial/WhileLoop
2828
29-
*/
29+
*/
3030

3131

3232
// These constants won't change:

examples/05.Control/switchCase/switchCase.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
This example code is in the public domain.
2121
2222
http://www.arduino.cc/en/Tutorial/SwitchCase
23-
*/
23+
*/
2424

2525
// these constants won't change. They are the
2626
// lowest and highest readings you get from your sensor:

examples/05.Control/switchCase2/switchCase2.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
This example code is in the public domain.
1919
2020
http://www.arduino.cc/en/Tutorial/SwitchCase2
21-
*/
21+
*/
2222

2323
void setup() {
2424
// initialize serial communication:

examples/06.Sensors/Knock/Knock.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
2020
This example code is in the public domain.
2121
22-
*/
22+
*/
2323

2424

2525
// these constants won't change:

0 commit comments

Comments
 (0)