Skip to content

Commit c3c415d

Browse files
author
smellai
committed
fixes from en
1 parent bd2bdb2 commit c3c415d

File tree

228 files changed

+2867
-705
lines changed

Some content is hidden

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

228 files changed

+2867
-705
lines changed

AsciiDoc_sample/AsciiDoc_Dictionary/AsciiDoc_Template-Dictionary.adoc

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
// ARDUINO PYGMENTS HIGHLIGHT ATTRIBUTE ►►►►► ALWAYS INCLUDE IN YOUR FILE ◄◄◄◄◄
2-
:source-highlighter: pygments
3-
:pygments-style: arduino
1+
2+
43

54
// This is a documentation file for authors and editors of the Arduino Manutius content platform.
65
// Below you can find a list of all the possible page elements with the corresponding
@@ -144,12 +143,12 @@ for (int 1; i<=99; i++) {
144143

145144
This is a block image with a URL
146145
[%hardbreaks]
147-
image::http://store.arduino.cc/bmz_cache/b/babe9d3f8563ea2f170dd55539f06310.image.538x354.jpg[]
146+
image::https://store-cdn.arduino.cc/uni/catalog/product/cache/1/image/1040x660/604a3538c15e081937dbfbd20aa60aad/A/0/A000066_featured_2.jpg[]
148147

149148

150149
This is an image saved in the attachments folder with a caption
151150
[%hardbreaks]
152-
image::attachments/ArduinoUno_R3_Front_450px.jpg[caption="", title="A beautiful Arduino UNO"]
151+
image::https://www.arduino.cc/reference/en/AsciiDoc_sample/AsciiDoc_Dictionary/attachments/ArduinoUno_R3_Front_450px.jpg[caption="", title="A beautiful Arduino UNO"]
153152

154153

155154
'''
@@ -158,23 +157,23 @@ image::attachments/ArduinoUno_R3_Front_450px.jpg[caption="", title="A beautiful
158157

159158
This is a pretty embed of code from Gist
160159
++++
161-
<script src="http://gist.github.com/mojavelinux/5333524.js">
160+
<script src="https://gist.github.com/mojavelinux/5333524.js">
162161
</script>
163162
++++
164163

165164
{empty} +
166165

167166
And this is another of a video from YouTube
168167
++++
169-
<iframe width="100%" height="315" src="http://www.youtube-nocookie.com/embed/UoBUXOOdLXY?rel=0&amp;controls=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>
168+
<iframe width="100%" height="315" src="https://www.youtube.com/watch?v=6cRFf4qkcTw?rel=0&amp;controls=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>
170169
++++
171170
// HINT: Please remember to set the iframe width to 100% to have the video responsive on all our platforms
172171

173172
{empty} +
174173

175174
And here some slides from Sideshare, yay!
176175
++++
177-
<iframe src="http://www.slideshare.net/slideshow/embed_code/4430242" width="100%" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen> </iframe> <div style="margin-bottom:5px"> <strong> <a href="//www.slideshare.net/damellis/introduction-to-arduino-4430242" title="Introduction to Arduino" target="_blank">Introduction to Arduino</a> </strong> from <strong><a href="//www.slideshare.net/damellis" target="_blank">David Mellis</a></strong> </div>
176+
<iframe src="https://www.slideshare.net/slideshow/embed_code/4430242" width="100%" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen> </iframe> <div style="margin-bottom:5px"> <strong> <a href="//www.slideshare.net/damellis/introduction-to-arduino-4430242" title="Introduction to Arduino" target="_blank">Introduction to Arduino</a> </strong> from <strong><a href="//www.slideshare.net/damellis" target="_blank">David Mellis</a></strong> </div>
178177
++++
179178
// HINT: Please remember to set the iframe width to 100% to have the slide show responsive on all our platforms
180179

AsciiDoc_sample/Reference_Terms/AsciiDoc_Template-Parent_Of_Entities.adoc

+2-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ subCategories: [ "Subcategory Name" ]
88
// categories: Pick between Structure, Variable or Function
99
// The subcategory within the ones available in the index ("Digital I/O", "Arithmetic Operators")
1010

11-
// ARDUINO PYGMENTS HIGHLIGHT ATTRIBUTE ►►►►► ALWAYS INCLUDE IN YOUR FILE ◄◄◄◄◄
12-
:source-highlighter: pygments
13-
:pygments-style: arduino
11+
12+
1413

1514

1615
// PAGE TITLE ►►►►► THIS IS MANDATORY ◄◄◄◄◄

AsciiDoc_sample/Reference_Terms/AsciiDoc_Template-Single_Entity.adoc

+2-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ subCategories: [ "Subcategory Name" ]
1010
// categories: Pick between Structure, Variable or Function
1111
// The subcategory within the ones available in the index ("Digital I/O", "Arithmetic Operators")
1212

13-
// ARDUINO PYGMENTS HIGHLIGHT ATTRIBUTE ►►►►► ALWAYS INCLUDE IN YOUR FILE ◄◄◄◄◄
14-
:source-highlighter: pygments
15-
:pygments-style: arduino
13+
14+
1615

1716

1817
// PAGE TITLE

Language/Functions/Advanced IO/noTone.adoc

-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ subCategories: [ "Advanced I/O" ]
66
aliases: [ /language/functions/advanced-io/noTone/ ]
77
---
88

9-
:source-highlighter: pygments
10-
:pygments-style: arduino
11-
12-
139

1410
= noTone()
1511

Language/Functions/Advanced IO/pulseIn.adoc

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ categories: [ "Functions" ]
44
subCategories: [ "Advanced I/O" ]
55
---
66

7-
:source-highlighter: pygments
8-
:pygments-style: arduino
7+
98

109

1110

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
title: pulseInLong()
3+
categories: [ "Functions" ]
4+
subCategories: [ "Advanced I/O" ]
5+
---
6+
7+
8+
9+
10+
11+
= pulseInLong()
12+
13+
14+
// OVERVIEW SECTION STARTS
15+
[#overview]
16+
--
17+
18+
[float]
19+
=== Description
20+
Reads a pulse (either HIGH or LOW) on a pin. For example, if value is HIGH, `pulseInLong()` waits for the pin to go `HIGH`, starts timing, then waits for the pin to go `LOW` and stops timing. Returns the length of the pulse in microseconds or 0 if no complete pulse was received within the timeout.
21+
22+
The timing of this function has been determined empirically and will probably show errors in shorter pulses. Works on pulses from 10 microseconds to 3 minutes in length. Please also note that if the pin is already high when the function is called, it will wait for the pin to go LOW and then HIGH before it starts counting. This routine can be used only if interrupts are activated. Furthermore the highest resolution is obtained with large intervals.
23+
[%hardbreaks]
24+
25+
26+
[float]
27+
=== Syntax
28+
`pulseInLong(pin, value)`
29+
30+
`pulseInLong(pin, value, timeout)`
31+
32+
[float]
33+
=== Parameters
34+
`pin`: the number of the pin on which you want to read the pulse. (int)
35+
36+
`value`: type of pulse to read: either link:../../../variables/constants/constants/[HIGH] or link:../../../variables/constants/constants/[LOW]. (int)
37+
38+
`timeout` (optional): the number of microseconds to wait for the pulse to start; default is one second (unsigned long)
39+
[float]
40+
=== Returns
41+
the length of the pulse (in microseconds) or 0 if no pulse started before the timeout (unsigned long)
42+
43+
--
44+
// OVERVIEW SECTION ENDS
45+
46+
47+
48+
49+
// HOW TO USE SECTION STARTS
50+
[#howtouse]
51+
--
52+
53+
[float]
54+
=== Example Code
55+
// Describe what the example code is all about and add relevant code ►►►►► THIS SECTION IS MANDATORY ◄◄◄◄◄
56+
The example calculated the time duration of a pulse on pin 7.
57+
58+
[source,arduino]
59+
----
60+
int pin = 7;
61+
unsigned long duration;
62+
63+
void setup() {
64+
pinMode(pin, INPUT);
65+
}
66+
67+
void loop() {
68+
duration = pulseInLong(pin, HIGH);
69+
}
70+
----
71+
[%hardbreaks]
72+
73+
[float]
74+
=== Notes and Warnings
75+
This function relies on micros() so cannot be used in link:../../interrupts/nointerrupts[noInterrupts()] context.
76+
77+
--
78+
// HOW TO USE SECTION ENDS

Language/Functions/Advanced IO/shiftIn.adoc

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ categories: [ "Functions" ]
44
subCategories: [ "Advanced I/O" ]
55
---
66

7-
:source-highlighter: pygments
8-
:pygments-style: arduino
7+
98

109

1110

@@ -22,7 +21,7 @@ Shifts in a byte of data one bit at a time. Starts from either the most (i.e. th
2221

2322
If you're interfacing with a device that's clocked by rising edges, you'll need to make sure that the clock pin is low before the first call to `shiftIn()`, e.g. with a call to `digitalWrite(clockPin, LOW)`.
2423

25-
Note: this is a software implementation; Arduino also provides an link:../SPI[SPI library] that uses the hardware implementation, which is faster but only works on specific pins.
24+
Note: this is a software implementation; Arduino also provides an link:https://www.arduino.cc/en/Reference/SPI[SPI library] that uses the hardware implementation, which is faster but only works on specific pins.
2625
[%hardbreaks]
2726

2827

Language/Functions/Advanced IO/shiftOut.adoc

+2-7
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ categories: [ "Functions" ]
44
subCategories: [ "Advanced I/O" ]
55
---
66

7-
:source-highlighter: pygments
8-
:pygments-style: arduino
9-
10-
11-
127
= shiftOut()
138

149

@@ -22,7 +17,7 @@ Shifts out a byte of data one bit at a time. Starts from either the most (i.e. t
2217

2318
Note- if you're interfacing with a device that's clocked by rising edges, you'll need to make sure that the clock pin is low before the call to `shiftOut()`, e.g. with a call to `digitalWrite(clockPin, LOW)`.
2419

25-
This is a software implementation; see also the link:../SPI[SPI library], which provides a hardware implementation that is faster but works only on specific pins.
20+
This is a software implementation; see also the linkhttps://www.arduino.cc/en/Reference/SPI[SPI library], which provides a hardware implementation that is faster but works only on specific pins.
2621
[%hardbreaks]
2722

2823

@@ -103,7 +98,7 @@ void loop() {
10398

10499
[float]
105100
=== Notes and Warnings
106-
The dataPin and clockPin must already be configured as outputs by a call to link:../digital-io/pinMode[pinMode()].
101+
The dataPin and clockPin must already be configured as outputs by a call to link:../../digital-io/pinmode[pinMode()].
107102

108103
shiftOut is currently written to output 1 byte (8 bits) so it requires a two step operation to output values larger than 255.
109104
[source,arduino]

Language/Functions/Advanced IO/tone.adoc

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ categories: [ "Functions" ]
44
subCategories: [ "Advanced I/O" ]
55
---
66

7-
:source-highlighter: pygments
8-
:pygments-style: arduino
7+
98

109

1110

Language/Functions/Analog IO/analogRead.adoc

+4-5
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ categories: [ "Functions" ]
44
subCategories: [ "Analog I/O" ]
55
---
66

7-
:source-highlighter: pygments
8-
:pygments-style: arduino
7+
98

109

1110
= analogRead()
@@ -17,7 +16,7 @@ subCategories: [ "Analog I/O" ]
1716

1817
[float]
1918
=== Description
20-
Reads the value from the specified analog pin. The Arduino board contains a 6 channel (8 channels on the Mini and Nano, 16 on the Mega), 10-bit analog to digital converter. This means that it will map input voltages between 0 and 5 volts into integer values between 0 and 1023. This yields a resolution between readings of: 5 volts / 1024 units or, .0049 volts (4.9 mV) per unit. The input range and resolution can be changed using link:../analogReference[analogReference()]`.
19+
Reads the value from the specified analog pin. The Arduino board contains a 6 channel (8 channels on the Mini and Nano, 16 on the Mega), 10-bit analog to digital converter. This means that it will map input voltages between 0 and 5 volts into integer values between 0 and 1023. This yields a resolution between readings of: 5 volts / 1024 units or, .0049 volts (4.9 mV) per unit. The input range and resolution can be changed using link:../analogreference[analogReference()]`.
2120

2221
It takes about 100 microseconds (0.0001 s) to read an analog input, so the maximum reading rate is about 10,000 times a second.
2322
[%hardbreaks]
@@ -86,7 +85,7 @@ If the analog input pin is not connected to anything, the value returned by anal
8685
=== See also
8786

8887
[role="language"]
89-
* #LANGUAGE# link:../../arduino-due-only/analogreadresolution[analogReadResolution()]
88+
* #LANGUAGE# link:../../zero-due-mkr-family/analogreadresolution[analogReadResolution()]
9089
* #LANGUAGE# https://www.arduino.cc/en/Tutorial/AnalogInputPins[Tutorial: Analog Input Pins]
9190
--
92-
// SEE ALSO SECTION ENDS
91+
// SEE ALSO SECTION ENDS

Language/Functions/Analog IO/analogReference.adoc

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ categories: [ "Functions" ]
44
subCategories: [ "Analog I/O" ]
55
---
66

7-
:source-highlighter: pygments
8-
:pygments-style: arduino
7+
98
//
109

1110

Language/Functions/Analog IO/analogWrite.adoc

+4-5
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ categories: [ "Functions" ]
44
subCategories: [ "Analog I/O" ]
55
---
66

7-
:source-highlighter: pygments
8-
:pygments-style: arduino
7+
98

109

1110

@@ -18,9 +17,9 @@ subCategories: [ "Analog I/O" ]
1817

1918
[float]
2019
=== Description
21-
Writes an analog value (http://arduino.cc/en/Tutorial/PWM[PWM wave]) to a pin. Can be used to light a LED at varying brightnesses or drive a motor at various speeds. After a call to `analogWrite()`, the pin will generate a steady square wave of the specified duty cycle until the next call to `analogWrite()` (or a call to `digitalRead()` or `digitalWrite()` on the same pin). The frequency of the PWM signal on most pins is approximately 490 Hz. On the Uno and similar boards, pins 5 and 6 have a frequency of approximately 980 Hz.
20+
Writes an analog value (http://arduino.cc/en/Tutorial/PWM[PWM wave]) to a pin. Can be used to light a LED at varying brightnesses or drive a motor at various speeds. After a call to `analogWrite()`, the pin will generate a steady square wave of the specified duty cycle until the next call to `analogWrite()` (or a call to `digitalRead()` or `digitalWrite()`) on the same pin. The frequency of the PWM signal on most pins is approximately 490 Hz. On the Uno and similar boards, pins 5 and 6 have a frequency of approximately 980 Hz.
2221
[%hardbreaks]
23-
On most Arduino boards (those with the ATmega168 or ATmega328), this function works on pins 3, 5, 6, 9, 10, and 11. On the Arduino Mega, it works on pins 2 - 13 and 44 - 46. Older Arduino boards with an ATmega8 only support `analogWrite()` on pins 9, 10, and 11.
22+
On most Arduino boards (those with the ATmega168 or ATmega328P), this function works on pins 3, 5, 6, 9, 10, and 11. On the Arduino Mega, it works on pins 2 - 13 and 44 - 46. Older Arduino boards with an ATmega8 only support `analogWrite()` on pins 9, 10, and 11.
2423
The Arduino DUE supports `analogWrite()` on pins 2 through 13, plus pins DAC0 and DAC1. Unlike the PWM pins, DAC0 and DAC1 are Digital to Analog converters, and act as true analog outputs.
2524
You do not need to call `pinMode()` to set the pin as an output before calling `analogWrite()`.
2625
The `analogWrite` function has nothing to do with the analog pins or the `analogRead` function.
@@ -93,7 +92,7 @@ The PWM outputs generated on pins 5 and 6 will have higher-than-expected duty cy
9392
=== See also
9493

9594
[role="language"]
96-
* #LANGUAGE# link:../../arduino-due-only/analogwriteresolution[analogWriteResolution()]
95+
* #LANGUAGE# link:../../zero-due-mkr-family/analogwriteresolution[analogWriteResolution()]
9796

9897
[role="definition"]
9998
* #DEFINITION# http://arduino.cc/en/Tutorial/PWM[PWM^]

Language/Functions/Bits and Bytes/bit.adoc

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ categories: [ "Functions" ]
44
subCategories: [ "Bits and Bytes" ]
55
---
66

7-
:source-highlighter: pygments
8-
:pygments-style: arduino
7+
98

109

1110

Language/Functions/Bits and Bytes/bitClear.adoc

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ categories: [ "Functions" ]
44
subCategories: [ "Bits and Bytes" ]
55
---
66

7-
:source-highlighter: pygments
8-
:pygments-style: arduino
7+
98

109

1110

Language/Functions/Bits and Bytes/bitRead.adoc

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ categories: [ "Functions" ]
44
subCategories: [ "Bits and Bytes" ]
55
---
66

7-
:source-highlighter: pygments
8-
:pygments-style: arduino
7+
98

109

1110

Language/Functions/Bits and Bytes/bitSet.adoc

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ categories: [ "Functions" ]
44
subCategories: [ "Bits and Bytes" ]
55
---
66

7-
:source-highlighter: pygments
8-
:pygments-style: arduino
7+
98

109

1110

Language/Functions/Bits and Bytes/bitWrite.adoc

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ categories: [ "Functions" ]
44
subCategories: [ "Bits and Bytes" ]
55
---
66

7-
:source-highlighter: pygments
8-
:pygments-style: arduino
7+
98

109

1110

Language/Functions/Bits and Bytes/highByte.adoc

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ categories: [ "Functions" ]
44
subCategories: [ "Bits and Bytes" ]
55
---
66

7-
:source-highlighter: pygments
8-
:pygments-style: arduino
7+
98

109

1110

Language/Functions/Bits and Bytes/lowByte.adoc

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ categories: [ "Functions" ]
44
subCategories: [ "Bits and Bytes" ]
55
---
66

7-
:source-highlighter: pygments
8-
:pygments-style: arduino
7+
98

109

1110

0 commit comments

Comments
 (0)