Skip to content

Commit 45ea354

Browse files
committed
Merge branch 'master' of https://github.com/arduino/reference-en
2 parents 632dfb1 + 5d1c3c8 commit 45ea354

File tree

10 files changed

+50
-43
lines changed

10 files changed

+50
-43
lines changed

Language/Functions/Characters/isAlpha.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
---
1+
---
22
title: "isAlpha()"
33
categories: [ "Functions" ]
44
subCategories: [ "Characters" ]

Language/Functions/Characters/isHexadecimalDigit.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ Analyse if a char is an hexadecimal digit (A-F, 0-9). Returns true if thisChar c
2525
=== Syntax
2626
[source,arduino]
2727
----
28-
`isHexadecimalDigit(thisChar)`
28+
29+
isHexadecimalDigit(thisChar)
30+
2931
----
3032

3133
[float]

Language/Functions/Characters/isPrintable.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Analyse if a char is printable (that is any character that produces an output, e
2525
=== Syntax
2626
[source,arduino]
2727
----
28-
`isAlpha(thisChar)`
28+
`isPrintable(thisChar)`
2929
----
3030

3131
[float]

Language/Functions/Communication/Serial/readString.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ title: Serial.readString()
1414

1515
[float]
1616
=== Description
17-
`Serial.readString()` reads characters from the serial buffer into a string. The function terminates if it times out (see link:../setTimeout[setTimeout()]).
17+
`Serial.readString()` reads characters from the serial buffer into a string. The function terminates if it times out (see link:../settimeout[setTimeout()]).
1818

1919
This function is part of the Stream class, and is called by any class that inherits from it (Wire, Serial, etc). See the link:../../stream[Stream class] main page for more information.
2020

@@ -56,8 +56,8 @@ A String read from the serial buffer
5656
* #LANGUAGE# link:../print[print()]
5757
* #LANGUAGE# link:../println[println()]
5858
* #LANGUAGE# link:../write[write()]
59-
* #LANGUAGE# link:../serialEvent[SerialEvent()]
60-
* #LANGUAGE# link:../../stream/streamParseFloat[Stream.parseFloat()]
59+
* #LANGUAGE# link:../serialevent[SerialEvent()]
60+
* #LANGUAGE# link:../parsefloat[parseFloat()]
6161

6262
--
6363
// SEE ALSO SECTION ENDS

Language/Functions/External Interrupts/attachInterrupt.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ The first parameter to attachInterrupt is an interrupt number. Normally you shou
2525
|===================================================
2626
|Board |Digital Pins Usable For Interrupts
2727
|Uno, Nano, Mini, other 328-based |2, 3
28+
|Uno WiFi Rev.2 |all digital pins
2829
|Mega, Mega2560, MegaADK |2, 3, 18, 19, 20, 21
2930
|Micro, Leonardo, other 32u4-based |0, 1, 2, 3, 7
3031
|Zero |all digital pins, except 4
31-
|MKR1000 Rev.1 |0, 1, 4, 5, 6, 7, 8, 9, A1, A2
32+
|MKR Family boards |0, 1, 4, 5, 6, 7, 8, 9, A1, A2
3233
|Due |all digital pins
3334
|101 |all digital pins (Only pins 2, 5, 7, 8, 10, 11, 12, 13 work with *CHANGE*)
3435
|===================================================
@@ -133,7 +134,7 @@ Note that in the table below, the interrupt numbers refer to the number to be pa
133134
|Mega2560 | 2 | 3 | 21 | 20 | 19 | 18
134135
|32u4 based (e.g Leonardo, Micro) | 3 | 2 | 0 | 1 | 7 |
135136
|===================================================
136-
For Due, Zero, MKR1000 and 101 boards the *interrupt number = pin number*.
137+
For Uno WiFiRev.2, Due, Zero, MKR Family and 101 boards the *interrupt number = pin number*.
137138

138139

139140
--

Language/Functions/External Interrupts/detachInterrupt.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,15 @@ Turns off the given interrupt.
2323

2424
[float]
2525
=== Syntax
26-
`detachInterrupt()` +
27-
`detachInterrupt(pin)` (Arduino Due only)
26+
`detachInterrupt(digitalPinToInterrupt(pin))` (Arduino AVR Boards only, recommended) +
27+
`detachInterrupt(interrupt)` (Arduino AVR Boards only, not recommended) +
28+
`detachInterrupt(pin)` (Arduino SAMD Boards, Due, 101 only)
2829

2930
[float]
3031
=== Parameters
3132
`interrupt`: the number of the interrupt to disable (see link:../attachinterrupt[attachInterrupt()] for more details).
3233

33-
`pin`: the pin number of the interrupt to disable (Arduino Due only)
34+
`pin`: the pin number of the interrupt to disable
3435

3536
[float]
3637
=== Returns

Language/Variables/Data Types/String/Operators/append.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
---
1+
---
22
title: "+="
33
title_expanded: append
44
categories: [ "Data Types" ]
@@ -57,4 +57,4 @@ None
5757
[role="example"]
5858
* #EXAMPLE# link: https://www.arduino.cc/en/Tutorial/BuiltInExamples#strings[Built-in String Tutorials]
5959
--
60-
// SEE ALSO SECTION ENDS
60+
// SEE ALSO SECTION ENDS

Language/Variables/Data Types/String.adoc renamed to Language/Variables/Data Types/string.adoc

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: String
2+
title: string
33
categories: [ "Variables" ]
44
subCategories: [ "Data Types" ]
55
---
@@ -17,12 +17,12 @@ subCategories: [ "Data Types" ]
1717

1818
[float]
1919
=== Description
20-
Text Strings can be represented in two ways. you can use the String data type, which is part of the core as of version 0019, or you can make a String out of an array of type char and null-terminate it. This page described the latter method. For more details on the String object, which gives you more functionality at the cost of more memory, see the link:../stringobject[String object] page.
20+
Text strings can be represented in two ways. you can use the String data type, which is part of the core as of version 0019, or you can make a string out of an array of type char and null-terminate it. This page described the latter method. For more details on the String object, which gives you more functionality at the cost of more memory, see the link:../stringobject[String object] page.
2121
[%hardbreaks]
2222

2323
[float]
2424
=== Syntax
25-
All of the following are valid declarations for Strings.
25+
All of the following are valid declarations for strings.
2626

2727
`char Str1[15];` +
2828
`char Str2[8] = {'a', 'r', 'd', 'u', 'i', 'n', 'o'};` +
@@ -31,30 +31,30 @@ All of the following are valid declarations for Strings.
3131
`char Str5[8] = "arduino";` +
3232
`char Str6[15] = "arduino";`
3333

34-
*Possibilities for declaring Strings*
34+
*Possibilities for declaring strings*
3535

3636
* Declare an array of chars without initializing it as in Str1
3737
* Declare an array of chars (with one extra char) and the compiler will add the required null character, as in Str2
3838
* Explicitly add the null character, Str3
39-
* Initialize with a String constant in quotation marks; the compiler will size the array to fit the String constant and a terminating null character, Str4
40-
* Initialize the array with an explicit size and String constant, Str5
41-
* Initialize the array, leaving extra space for a larger String, Str6
39+
* Initialize with a string constant in quotation marks; the compiler will size the array to fit the string constant and a terminating null character, Str4
40+
* Initialize the array with an explicit size and string constant, Str5
41+
* Initialize the array, leaving extra space for a larger string, Str6
4242

4343
*Null termination*
4444

45-
Generally, Strings are terminated with a null character (ASCII code 0). This allows functions (like `Serial.print()`) to tell where the end of a String is. Otherwise, they would continue reading subsequent bytes of memory that aren't actually part of the String.
45+
Generally, strings are terminated with a null character (ASCII code 0). This allows functions (like `Serial.print()`) to tell where the end of a string is. Otherwise, they would continue reading subsequent bytes of memory that aren't actually part of the string.
4646

47-
This means that your String needs to have space for one more character than the text you want it to contain. That is why Str2 and Str5 need to be eight characters, even though "arduino" is only seven - the last position is automatically filled with a null character. Str4 will be automatically sized to eight characters, one for the extra null. In Str3, we've explicitly included the null character (written '\0') ourselves.
47+
This means that your string needs to have space for one more character than the text you want it to contain. That is why Str2 and Str5 need to be eight characters, even though "arduino" is only seven - the last position is automatically filled with a null character. Str4 will be automatically sized to eight characters, one for the extra null. In Str3, we've explicitly included the null character (written '\0') ourselves.
4848

49-
Note that it's possible to have a String without a final null character (e.g. if you had specified the length of Str2 as seven instead of eight). This will break most functions that use Strings, so you shouldn't do it intentionally. If you notice something behaving strangely (operating on characters not in the String), however, this could be the problem.
49+
Note that it's possible to have a string without a final null character (e.g. if you had specified the length of Str2 as seven instead of eight). This will break most functions that use strings, so you shouldn't do it intentionally. If you notice something behaving strangely (operating on characters not in the string), however, this could be the problem.
5050

5151
*Single quotes or double quotes?*
5252

5353
Strings are always defined inside double quotes ("Abc") and characters are always defined inside single quotes('A').
5454

55-
*Wrapping long Strings*
55+
*Wrapping long strings*
5656

57-
You can wrap long Strings like this:
57+
You can wrap long strings like this:
5858

5959
[source,arduino]
6060
----
@@ -63,9 +63,9 @@ char myString[] = "This is the first line"
6363
" etcetera";
6464
----
6565

66-
*Arrays of Strings*
66+
*Arrays of strings*
6767

68-
It is often convenient, when working with large amounts of text, such as a project with an LCD display, to setup an array of Strings. Because Strings themselves are arrays, this is in actually an example of a two-dimensional array.
68+
It is often convenient, when working with large amounts of text, such as a project with an LCD display, to setup an array of strings. Because strings themselves are arrays, this is in actually an example of a two-dimensional array.
6969

7070
In the code below, the asterisk after the datatype `char` "`char*`" indicates that this is an array of "`pointers`". All array names are actually pointers, so this is required to make an array of arrays. Pointers are one of the more esoteric parts of C for beginners to understand, but it isn't necessary to understand pointers in detail to use them effectively here.
7171

@@ -86,8 +86,8 @@ In the code below, the asterisk after the datatype `char` "`char*`" indicates th
8686

8787
[source,arduino]
8888
----
89-
char* myStrings[]={"This is String 1", "This is String 2", "This is String 3",
90-
"This is String 4", "This is String 5","This is String 6"};
89+
char* myStrings[]={"This is string 1", "This is string 2", "This is string 3",
90+
"This is string 4", "This is string 5","This is string 6"};
9191
9292
void setup(){
9393
Serial.begin(9600);

Language/Variables/Data Types/stringObject.adoc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Constructs an instance of the String class. There are multiple versions that con
2626
* a constant integer or long integer, using a specified base
2727
* an integer or long integer variable
2828
* an integer or long integer variable, using a specified base
29-
* a float or double, using a specified decimal palces
29+
* a float or double, using a specified decimal places
3030

3131
Constructing a String from a number results in a string that contains the ASCII representation of that number. The default is base ten, so
3232
[source,arduino]
@@ -85,16 +85,16 @@ an instance of the String class.
8585
All of the following are valid declarations for Strings.
8686
[source,arduino]
8787
----
88-
String stringOne = "Hello String"; // using a constant String
89-
String stringOne = String('a'); // converting a constant char into a String
90-
String stringTwo = String("This is a string"); // converting a constant string into a String object
91-
String stringOne = String(stringTwo + " with more"); // concatenating two strings
92-
String stringOne = String(13); // using a constant integer
93-
String stringOne = String(analogRead(0), DEC); // using an int and a base
94-
String stringOne = String(45, HEX); // using an int and a base (hexadecimal)
95-
String stringOne = String(255, BIN); // using an int and a base (binary)
96-
String stringOne = String(millis(), DEC); // using a long and a base
97-
String stringOne = String(5.698, 3); // using a float and the decimal places
88+
String stringOne = "Hello String"; // using a constant String
89+
String stringOne = String('a'); // converting a constant char into a String
90+
String stringTwo = String("This is a string"); // converting a constant string into a String object
91+
String stringOne = String(stringTwo + " with more"); // concatenating two strings
92+
String stringOne = String(13); // using a constant integer
93+
String stringOne = String(analogRead(0), DEC); // using an int and a base
94+
String stringOne = String(45, HEX); // using an int and a base (hexadecimal)
95+
String stringOne = String(255, BIN); // using an int and a base (binary)
96+
String stringOne = String(millis(), DEC); // using a long and a base
97+
String stringOne = String(5.698, 3); // using a float and the decimal places
9898
----
9999

100100
--

README.adoc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ We are glad you want to contribute to the Arduino Reference: that's the best way
3131

3232
Your contribution is adding or modifying existing code or full descriptions, please always refer to an existing issue or open a new one before contributing.
3333

34-
Please note that your contribution to the Arduino Reference is licensed under a Creative Commons Attribution-Share Alike 3.0 License. see https://creativecommons.org/licenses/by-sa/3.0/
35-
36-
3734
=== Folder Structure
3835
[source]
3936
----
@@ -56,3 +53,9 @@ reference-en
5653
----
5754

5855
Within the Language folder, the file tree follows the same structure as in the link:https://www.arduino.cc/reference/en[Arduino Reference webpage]
56+
57+
=== License
58+
59+
Please note that your contribution to the Arduino Reference is licensed under a Creative Commons Attribution-Share Alike 3.0 License. see https://creativecommons.org/licenses/by-sa/3.0/
60+
61+
image:https://i.creativecommons.org/l/by-sa/3.0/88x31.png[Creative Commons License, title="Creative Commons License"] This work is licensed under a link:https://creativecommons.org/licenses/by-sa/3.0/deed.en[Creative Commons Attribution-ShareAlike 3.0 Unported License].

0 commit comments

Comments
 (0)