Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ This is `code` in a sentence +
This can be a lot more code
[source,arduino]
----
for (int 1; i<=99; i++) {
Serial.println('We want more code!');
for (int i = 0; i <= 99; i++) {
Serial.println('We want more code!');
}
----
[%hardbreaks]
Expand Down
2 changes: 1 addition & 1 deletion Language/Structure/Control Structure/break.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ In the following code, the control exits the `for` loop when the sensor value ex
[source,arduino]
----
int threshold = 40;
for (int x = 0; x < 255; x ++) {
for (int x = 0; x < 255; x++) {
analogWrite(PWMpin, x);
sens = analogRead(sensorPin);
if (sens > threshold) { // bail out on sensor detect
Expand Down
6 changes: 3 additions & 3 deletions Language/Variables/Utilities/PROGMEM.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ The following code fragments illustrate how to read and write unsigned chars (by
[source,arduino]
----
// save some unsigned ints
const PROGMEM uint16_t charSet[] = { 65000, 32796, 16843, 10, 11234};
const PROGMEM uint16_t charSet[] = { 65000, 32796, 16843, 10, 11234};

// save some chars
const char signMessage[] PROGMEM = {"I AM PREDATOR, UNSEEN COMBATANT. CREATED BY THE UNITED STATES DEPART"};
const char signMessage[] PROGMEM = {"I AM PREDATOR, UNSEEN COMBATANT. CREATED BY THE UNITED STATES DEPART"};

unsigned int displayInt;
char myChar;
Expand All @@ -88,7 +88,7 @@ void setup() {

// read back a char
for (byte k = 0; k < strlen_P(signMessage); k++) {
myChar = pgm_read_byte_near(signMessage + k);
myChar = pgm_read_byte_near(signMessage + k);
Serial.print(myChar);
}

Expand Down