Skip to content

Commit a71b403

Browse files
per1234cmaglie
authored andcommitted
Fix typos in the comments of the built-in examples
1 parent 86c6103 commit a71b403

File tree

59 files changed

+169
-169
lines changed

Some content is hidden

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

59 files changed

+169
-169
lines changed

build/shared/examples/01.Basics/AnalogReadSerial/AnalogReadSerial.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
AnalogReadSerial
3-
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)
3+
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)
55
Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.
66
77
This example code is in the public domain.

build/shared/examples/01.Basics/Blink/Blink.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/*
22
Blink
3-
Turns on an LED on for one second, then off for one second, repeatedly.
3+
Turns an LED on for one second, then off for one second, repeatedly.
44
55
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
9-
the Technical Specs of your board at https://www.arduino.cc/en/Main/Products
9+
the Technical Specs of your board at https://www.arduino.cc/en/Main/Products
1010
1111
This example code is in the public domain.
1212

build/shared/examples/01.Basics/DigitalReadSerial/DigitalReadSerial.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
DigitalReadSerial
3-
Reads a digital input on pin 2, prints the result to the serial monitor
3+
Reads a digital input on pin 2, prints the result to the Serial Monitor
44
55
This example code is in the public domain.
66
*/

build/shared/examples/01.Basics/ReadAnalogVoltage/ReadAnalogVoltage.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
ReadAnalogVoltage
3-
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)
3+
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)
55
Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.
66
77
This example code is in the public domain.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Reads an analog input and prints the voltage to the serial monitor.
1+
Reads an analog input and prints the voltage to the Serial Monitor.

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
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
13-
the Technical Specs of your board at https://www.arduino.cc/en/Main/Products
13+
the Technical Specs of your board at https://www.arduino.cc/en/Main/Products
1414
1515
created 2005
1616
by David A. Mellis
@@ -27,17 +27,17 @@
2727
http://www.arduino.cc/en/Tutorial/BlinkWithoutDelay
2828
*/
2929

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

33-
// Variables will change :
33+
// Variables will change:
3434
int ledState = LOW; // ledState used to set the LED
3535

3636
// Generally, you should use "unsigned long" for variables that hold time
3737
// The value will quickly become too large for an int to store
3838
unsigned long previousMillis = 0; // will store last time LED was updated
3939

40-
// constants won't change :
40+
// constants won't change:
4141
const long interval = 1000; // interval at which to blink (milliseconds)
4242

4343
void setup() {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ int ledState = HIGH; // the current state of the output pin
4040
int buttonState; // the current reading from the input pin
4141
int lastButtonState = LOW; // the previous reading from the input pin
4242

43-
// the following variables are unsigned long's because the time, measured in miliseconds,
43+
// the following variables are unsigned longs because the time, measured in milliseconds,
4444
// will quickly become a bigger number than can be stored in an int.
4545
unsigned long lastDebounceTime = 0; // the last time the output pin was toggled
4646
unsigned long debounceDelay = 50; // the debounce time; increase if the output flickers
@@ -58,7 +58,7 @@ void loop() {
5858
int reading = digitalRead(buttonPin);
5959

6060
// check to see if you just pressed the button
61-
// (i.e. the input went from LOW to HIGH), and you've waited
61+
// (i.e. the input went from LOW to HIGH), and you've waited
6262
// long enough since the last press to ignore any noise:
6363

6464
// If the switch changed, due to noise or pressing:

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/*
2-
Input Pullup Serial
2+
Input Pull-up Serial
33
44
This example demonstrates the use of pinMode(INPUT_PULLUP). It reads a
5-
digital input on pin 2 and prints the results to the serial monitor.
5+
digital input on pin 2 and prints the results to the Serial Monitor.
66
77
The circuit:
88
* Momentary switch attached from pin 2 to ground
@@ -24,7 +24,7 @@
2424
void setup() {
2525
//start serial connection
2626
Serial.begin(9600);
27-
//configure pin2 as an input and enable the internal pull-up resistor
27+
//configure pin 2 as an input and enable the internal pull-up resistor
2828
pinMode(2, INPUT_PULLUP);
2929
pinMode(13, OUTPUT);
3030

@@ -36,7 +36,7 @@ void loop() {
3636
//print out the value of the pushbutton
3737
Serial.println(sensorVal);
3838

39-
// Keep in mind the pullup means the pushbutton's
39+
// Keep in mind the pull-up means the pushbutton's
4040
// logic is inverted. It goes HIGH when it's open,
4141
// and LOW when it's pressed. Turn on pin 13 when the
4242
// button's pressed, and off when it's not:

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,21 +53,21 @@ void loop() {
5353
// if the state has changed, increment the counter
5454
if (buttonState == HIGH) {
5555
// if the current state is HIGH then the button
56-
// wend from off to on:
56+
// went from off to on:
5757
buttonPushCounter++;
5858
Serial.println("on");
5959
Serial.print("number of button pushes: ");
6060
Serial.println(buttonPushCounter);
6161
} else {
6262
// if the current state is LOW then the button
63-
// wend from on to off:
63+
// went from on to off:
6464
Serial.println("off");
6565
}
6666
// Delay a little bit to avoid bouncing
6767
delay(50);
6868
}
6969
// save the current state as the last state,
70-
//for next time through the loop
70+
// for next time through the loop
7171
lastButtonState = buttonState;
7272

7373

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
Analog input, analog output, serial output
33
44
Reads an analog input pin, maps the result to a range from 0 to 255
5-
and uses the result to set the pulsewidth modulation (PWM) of an output pin.
6-
Also prints the results to the serial monitor.
5+
and uses the result to set the pulse width modulation (PWM) of an output pin.
6+
Also prints the results to the Serial Monitor.
77
88
The circuit:
99
* potentiometer connected to analog pin 0.
@@ -40,7 +40,7 @@ void loop() {
4040
// change the analog out value:
4141
analogWrite(analogOutPin, outputValue);
4242

43-
// print the results to the serial monitor:
43+
// print the results to the Serial Monitor:
4444
Serial.print("sensor = ");
4545
Serial.print(sensorValue);
4646
Serial.print("\t output = ");

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Analog Input
33
Demonstrates analog input by reading an analog sensor on analog pin 0 and
4-
turning on and off a light emitting diode(LED) connected to digital pin 13.
4+
turning on and off a light emitting diode(LED) connected to digital pin 13.
55
The amount of time the LED will be on and off depends on
66
the value obtained by analogRead().
77

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Mega analogWrite() test
33
44
This sketch fades LEDs up and down one at a time on digital pins 2 through 13.
5-
This sketch was written for the Arduino Mega, and will not work on previous boards.
5+
This sketch was written for the Arduino Mega, and will not work on other boards.
66
77
The circuit:
88
* LEDs attached from pins 2 through 13 to ground.
@@ -34,7 +34,7 @@ void loop() {
3434
analogWrite(thisPin, brightness);
3535
delay(2);
3636
}
37-
// fade the LED on thisPin from brithstest to off:
37+
// fade the LED on thisPin from brightest to off:
3838
for (int brightness = 255; brightness >= 0; brightness--) {
3939
analogWrite(thisPin, brightness);
4040
delay(2);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
// Define the number of samples to keep track of. The higher the number,
2525
// the more the readings will be smoothed, but the slower the output will
2626
// respond to the input. Using a constant rather than a normal variable lets
27-
// use this value to determine the size of the readings array.
27+
// us use this value to determine the size of the readings array.
2828
const int numReadings = 10;
2929

3030
int readings[numReadings]; // the readings from the analog input

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,22 @@ void setup() {
3333
// first visible ASCIIcharacter '!' is number 33:
3434
int thisByte = 33;
3535
// you can also write ASCII characters in single quotes.
36-
// for example. '!' is the same as 33, so you could also use this:
37-
//int thisByte = '!';
36+
// for example, '!' is the same as 33, so you could also use this:
37+
// int thisByte = '!';
3838

3939
void loop() {
4040
// prints value unaltered, i.e. the raw binary version of the
41-
// byte. The serial monitor interprets all bytes as
41+
// byte. The Serial Monitor interprets all bytes as
4242
// ASCII, so 33, the first number, will show up as '!'
4343
Serial.write(thisByte);
4444

4545
Serial.print(", dec: ");
4646
// prints value as string as an ASCII-encoded decimal (base 10).
47-
// Decimal is the default format for Serial.print() and Serial.println(),
47+
// Decimal is the default format for Serial.print() and Serial.println(),
4848
// so no modifier is needed:
4949
Serial.print(thisByte);
5050
// But you can declare the modifier for decimal if you want to.
51-
//this also works if you uncomment it:
51+
// this also works if you uncomment it:
5252

5353
// Serial.print(thisByte, DEC);
5454

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Dimmer
33
4-
Demonstrates the sending data from the computer to the Arduino board,
4+
Demonstrates sending data from the computer to the Arduino board,
55
in this case to control the brightness of an LED. The data is sent
66
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.
@@ -45,7 +45,7 @@ void loop() {
4545
/* Processing code for this example
4646
// Dimmer - sends bytes over a serial port
4747
// by David A. Mellis
48-
//This example code is in the public domain.
48+
// This example code is in the public domain.
4949
5050
import processing.serial.*;
5151
Serial port;

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
a USB cable. Bytes are sent one after another (serially) from the Arduino
99
to the computer.
1010
11-
You can use the Arduino serial monitor to view the sent data, or it can
11+
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
1313
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.
@@ -67,15 +67,15 @@ void setup () {
6767
// if using Processing 2.1 or later, use Serial.printArray()
6868
println(Serial.list());
6969
70-
// I know that the first port in the serial list on my mac
71-
// is always my Arduino, so I open Serial.list()[0].
70+
// I know that the first port in the serial list on my Mac
71+
// is always my Arduino, so I open Serial.list()[0].
7272
// Open whatever port is the one you're using.
7373
myPort = new Serial(this, Serial.list()[0], 9600);
7474
7575
// don't generate a serialEvent() unless you get a newline character:
7676
myPort.bufferUntil('\n');
7777
78-
// set inital background:
78+
// set initial background:
7979
background(0);
8080
}
8181
void draw () {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*/
2424

2525
void setup() {
26-
// Set MIDI baud rate:
26+
// Set MIDI baud rate:
2727
Serial.begin(31250);
2828
}
2929

@@ -39,8 +39,8 @@ void loop() {
3939
}
4040
}
4141

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Multple Serial test
2+
Multiple Serial test
33
44
Receives from the main serial port, sends to the others.
55
Receives from serial port 1, sends to the main serial (Serial 0).

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
it receives the character 'H', and turns off the LED when it
77
receives the character 'L'.
88
9-
The data can be sent from the Arduino serial monitor, or another
9+
The data can be sent from the Arduino Serial Monitor, or another
1010
program like Processing (see code below), Flash (via a serial-net
1111
proxy), PD, or Max/MSP.
1212
@@ -51,7 +51,7 @@ void loop() {
5151

5252
/* Processing code for this example
5353
54-
// mouseover serial
54+
// mouse over serial
5555
5656
// Demonstrates how to send data to the Arduino I/O board, in order to
5757
// turn ON a light if the mouse is over a square and turn it off
@@ -108,7 +108,7 @@ void loop() {
108108
port.write('H');
109109
}
110110
else {
111-
// return the box to it's inactive state:
111+
// return the box to its inactive state:
112112
stroke(153);
113113
fill(153);
114114
// send an 'L' to turn the LED off:

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void loop() {
5151
delay(10);
5252
// read second analog input, divide by 4 to make the range 0-255:
5353
secondSensor = analogRead(1) / 4;
54-
// read switch, map it to 0 or 255L
54+
// read switch, map it to 0 or 255L
5555
thirdSensor = map(digitalRead(2), 0, 1, 0, 255);
5656
// send sensor values:
5757
Serial.write(firstSensor);
@@ -94,8 +94,8 @@ void setup() {
9494
// if using Processing 2.1 or later, use Serial.printArray()
9595
println(Serial.list());
9696
97-
// I know that the first port in the serial list on my mac
98-
// is always my FTDI adaptor, so I open Serial.list()[0].
97+
// I know that the first port in the serial list on my Mac
98+
// is always my FTDI adaptor, so I open Serial.list()[0].
9999
// On Windows machines, this generally opens COM1.
100100
// Open whatever port is the one you're using.
101101
String portName = Serial.list()[0];

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void loop() {
5454
firstSensor = analogRead(A0);
5555
// read second analog input:
5656
secondSensor = analogRead(A1);
57-
// read switch, map it to 0 or 255L
57+
// read switch, map it to 0 or 255
5858
thirdSensor = map(digitalRead(2), 0, 1, 0, 255);
5959
// send sensor values:
6060
Serial.print(firstSensor);
@@ -92,8 +92,8 @@ void setup() {
9292
// if using Processing 2.1 or later, use Serial.printArray()
9393
println(Serial.list());
9494
95-
// I know that the first port in the serial list on my mac
96-
// is always my Arduino module, so I open Serial.list()[0].
95+
// I know that the first port in the serial list on my Mac
96+
// is always my Arduino board, so I open Serial.list()[0].
9797
// Change the 0 to the appropriate number of the serial port
9898
// that your microcontroller is attached to.
9999
myPort = new Serial(this, Serial.list()[0], 9600);
@@ -112,7 +112,7 @@ void draw() {
112112
ellipse(xpos, ypos, 20, 20);
113113
}
114114
115-
// serialEvent method is run automatically by the Processing applet
115+
// serialEvent method is run automatically by the Processing applet
116116
// whenever the buffer reaches the byte value set in the bufferUntil()
117117
// method in the setup():
118118

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
2121
*/
2222

23-
String inputString = ""; // a string to hold incoming data
23+
String inputString = ""; // a String to hold incoming data
2424
boolean stringComplete = false; // whether the string is complete
2525

2626
void setup() {

0 commit comments

Comments
 (0)