-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Small grammar fixes and clarifications #1003
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
/* | ||
ESP32 start counter example with Preferences library | ||
ESP32 startup counter example with Preferences library. | ||
|
||
This simple example demonstrate using Preferences library to store how many times | ||
was ESP32 module started. Preferences library is wrapper around Non-volatile | ||
This simple example demonstrates using the Preferences library to store how many times | ||
the ESP32 module has booted. the Preferences library is a wrapper around the Non-volatile | ||
storage on ESP32 processor. | ||
|
||
created for arduino-esp32 09 Feb 2017 | ||
|
@@ -17,29 +17,29 @@ void setup() { | |
Serial.begin(115200); | ||
Serial.println(); | ||
|
||
// Open Preferences with my-app namespace. Each application module, library, etc. | ||
// has to use namespace name to prevent key name collisions. We will open storage in | ||
// Open Preferences with my-app namespace. Each application module, library, etc | ||
// has to use a namespace name to prevent key name collisions. We will open storage in | ||
// RW-mode (second parameter has to be false). | ||
// Note: Namespace name is limited to 15 chars | ||
// Note: Namespace name is limited to 15 chars. | ||
preferences.begin("my-app", false); | ||
|
||
// Remove all preferences under opened namespace | ||
// Remove all preferences under the opened namespace | ||
//preferences.clear(); | ||
|
||
// Or remove the counter key only | ||
//preferences.remove("counter"); | ||
|
||
// Get a counter value, if key is not exist return default value 0 | ||
// Note: Key name is limited to 15 chars too | ||
// Get the counter value, if the key doess not exist, return a default value of 0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. SP "doess" |
||
// Note: Key name is limited to 15 chars. | ||
unsigned int counter = preferences.getUInt("counter", 0); | ||
|
||
// Increase counter | ||
// Increase counter by 1 | ||
counter++; | ||
|
||
// Print counter to a Serial | ||
// Print the counter to Serial Monitor | ||
Serial.printf("Current counter value: %u\n", counter); | ||
|
||
// Store counter to the Preferences | ||
// Store the counter to the Preferences | ||
preferences.putUInt("counter", counter); | ||
|
||
// Close the Preferences | ||
|
@@ -53,4 +53,4 @@ void setup() { | |
ESP.restart(); | ||
} | ||
|
||
void loop() {} | ||
void loop() {} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capitalization "the Preferences"