Skip to content

Commit b45f35f

Browse files
authored
Merge PR #564 "Fix formatting of example code" from per1234
Fix formatting of example code
2 parents 01af93a + b3f1271 commit b45f35f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Diff for: AsciiDoc_sample/AsciiDoc_Dictionary/AsciiDoc_Template-Dictionary.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ This is `code` in a sentence +
105105
This can be a lot more code
106106
[source,arduino]
107107
----
108-
for (int 1; i<=99; i++) {
109-
Serial.println('We want more code!');
108+
for (int i = 0; i <= 99; i++) {
109+
Serial.println('We want more code!');
110110
}
111111
----
112112
[%hardbreaks]

Diff for: Language/Structure/Control Structure/break.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ In the following code, the control exits the `for` loop when the sensor value ex
3636
[source,arduino]
3737
----
3838
int threshold = 40;
39-
for (int x = 0; x < 255; x ++) {
39+
for (int x = 0; x < 255; x++) {
4040
analogWrite(PWMpin, x);
4141
sens = analogRead(sensorPin);
4242
if (sens > threshold) { // bail out on sensor detect

Diff for: Language/Variables/Utilities/PROGMEM.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ The following code fragments illustrate how to read and write unsigned chars (by
6565
[source,arduino]
6666
----
6767
// save some unsigned ints
68-
const PROGMEM uint16_t charSet[] = { 65000, 32796, 16843, 10, 11234};
68+
const PROGMEM uint16_t charSet[] = { 65000, 32796, 16843, 10, 11234};
6969
7070
// save some chars
71-
const char signMessage[] PROGMEM = {"I AM PREDATOR, UNSEEN COMBATANT. CREATED BY THE UNITED STATES DEPART"};
71+
const char signMessage[] PROGMEM = {"I AM PREDATOR, UNSEEN COMBATANT. CREATED BY THE UNITED STATES DEPART"};
7272
7373
unsigned int displayInt;
7474
char myChar;
@@ -88,7 +88,7 @@ void setup() {
8888
8989
// read back a char
9090
for (byte k = 0; k < strlen_P(signMessage); k++) {
91-
myChar = pgm_read_byte_near(signMessage + k);
91+
myChar = pgm_read_byte_near(signMessage + k);
9292
Serial.print(myChar);
9393
}
9494

0 commit comments

Comments
 (0)