Skip to content

Commit 358d47c

Browse files
author
Alice Pintus
committed
Update terms after compilation
1 parent 05068bd commit 358d47c

File tree

4 files changed

+14
-19
lines changed

4 files changed

+14
-19
lines changed

Language/Functions/Analog IO/analogWrite.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@
1414
=== Description
1515
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.
1616
[%hardbreaks]
17-
18-
image::http://arduino.cc/en/uploads/Main/ArduinoUno_R3_Front_450px.jpg[caption="", title="A beautiful Arduino UNO"]
17+
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.
18+
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.
19+
You do not need to call `pinMode()` to set the pin as an output before calling `analogWrite()`.
20+
The `analogWrite` function has nothing to do with the analog pins or the `analogRead` function.
1921
[%hardbreaks]
2022

2123

@@ -45,7 +47,7 @@ Nothing
4547
--
4648

4749
[float]
48-
=== Example
50+
=== Example Code
4951
Sets the output to the LED proportional to the value read from the potentiometer.
5052

5153

@@ -71,9 +73,7 @@ void loop()
7173

7274
[float]
7375
=== Notes and Warnings
74-
This is because of interactions with the `millis()` and `delay()` functions
75-
[%hardbreaks]
76-
image::http://arduino.cc/en/uploads/Main/ArduinoUno_R3_Front_450px.jpg[caption="", title="A beautiful Arduino UNO"]
76+
The PWM outputs generated on pins 5 and 6 will have higher-than-expected duty cycles. This is because of interactions with the `millis()` and `delay()` functions, which share the same internal timer used to generate those PWM outputs. This will be noticed mostly on low duty-cycle settings (e.g. 0 - 10) and may result in a value of 0 not fully turning off the output on pins 5 and 6.
7777
[%hardbreaks]
7878

7979

Language/Structure/Boolean Operators/&&.adoc

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,11 @@
1212
[float]
1313
=== Description
1414
Boolean Operators can be used inside the condition of an `if` statement. +
15-
&& is true only if both operands are true, for instance in this example:
16-
17-
[source,arduino]
18-
----
19-
if (digitalRead(2) == HIGH && digitalRead(3) == HIGH) { // read two switches
20-
// ...
21-
}
15+
`&&` is true only if both operands are true, for instance in this example: +
2216

17+
`if (digitalRead(2) == HIGH && digitalRead(3) == HIGH)`
18+
[%hardbreaks]
2319
is true only if both inputs are high.
24-
----
2520
[%hardbreaks]
2621

2722
--
@@ -35,7 +30,7 @@ is true only if both inputs are high.
3530
--
3631

3732
[float]
38-
=== Example
33+
=== Example Code
3934

4035

4136
[source,arduino]
@@ -47,7 +42,7 @@ if (a >= 10 && a <= 20){} // true if a is between 10 and 20
4742

4843
[float]
4944
=== Notes and Warnings
50-
Make sure you don't mistake the boolean AND operator, && (double ampersand) for the bitwise AND operator & (single ampersand). They are entirely different beasts.
45+
Make sure you don't mistake the boolean AND operator, `&&` (double ampersand) for the bitwise AND operator `&` (single ampersand). They are entirely different beasts.
5146

5247

5348
[float]

Language/Structure/Further Syntax/CurlyBraces.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Unbalanced braces can often lead to cryptic, impenetrable compiler errors that c
3030
--
3131

3232
[float]
33-
=== Example
33+
=== Example Code
3434
The main uses of curly braces are listed in the examples below.
3535

3636

@@ -77,7 +77,7 @@ for (initialisation; termination condition; incrementing expr)
7777

7878

7979
[float]
80-
==== Functions
80+
==== Conditional Statements
8181

8282

8383
[source,arduino]

Language/Structure/Main/setup.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Nothing
3333
--
3434

3535
[float]
36-
=== Example
36+
=== Example Code
3737

3838
[source,arduino]
3939
----

0 commit comments

Comments
 (0)