Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
esp8266-oled-ssd1306
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
c3pb
esp8266-oled-ssd1306
Commits
63dc8a03
Commit
63dc8a03
authored
8 years ago
by
Fabrice Weinberg
Browse files
Options
Downloads
Patches
Plain Diff
Add info about text logging feature
parent
de40835b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
UPGRADE-3.0.md
+18
-0
18 additions, 0 deletions
UPGRADE-3.0.md
with
18 additions
and
0 deletions
UPGRADE-3.0.md
+
18
−
0
View file @
63dc8a03
...
...
@@ -56,6 +56,8 @@ void overlay1(OLEDDisplay *display, OLEDDisplayUiState* state);
## New Features
### Loading Animation
While using this library ourself we noticed a pattern emerging. We want to drawing
a loading progress while connecting to WiFi and updating weather data etc.
...
...
@@ -105,3 +107,19 @@ void myLoadingDraw(OLEDDisplay *display, LoadingStage* stage, uint8_t progress)
After defining a function like that, you can pass it to the Ui library by use
`ui.setLoadingDrawFunction(myLoadingDraw)`
.
### Text Logging
It is always useful to display some text on the display without worrying to much
where it goes and managing it. In 3.0 we made the
`OLEDDisplay`
class implement
[
`Print`
](
https://github.com/arduino/Arduino/blob/master/hardware/arduino/avr/cores/arduino/Print.h
)
so you can use it like you would use
`Serial`
. We calls this feature
`LogBuffer`
and the only thing you have to do is to define how many lines you want to display
and how many characters there are on average on each. This is done by calling
`setLogBuffer(lines, chars);`
. If there is not enough memory the function will
return false.
After that you can draw the
`LogBuffer`
anywhere you want by calling
`drawLogBuffer(x, y)`
.
(Note: You have to call
`display()`
to update the screen)
We made a
[
video
](
https://www.youtube.com/watch?v=8Fiss77A3TE
)
showing this feature in action.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment