This commit is contained in:
kraus 2018-05-27 19:20:56 +02:00
parent 60e8e71d19
commit 809557338c
2 changed files with 15 additions and 1 deletions

View File

@ -174,7 +174,18 @@ Q: U8g2 output is corrupted. What are possible causes?
Do *not* call digitalRead/analogRead inside the firstPage/nextPage loop.
Read any sensor values into a variable *before* firstPage() and use the
variable value inside the loop.
- If the output includes unicode chars, use the UTF8 procedures.
If the output includes unicode chars, use the UTF8 procedures.
Q: U8g2 is slow. How to improve speed?
A1: If there is sufficient RAM, use the F variant of the constructor (see the question
on F/1/2 above).
A2: Use hardware SPI or I2C communication. Software emulated SPI or I2C is much
slower (see the question on SW and HW SPI/I2C above)
A3: "firstPage/nextPage loop": Remove as much of code out of this loop. Try to
precalculate as much of possible before the loop is entered.
A4: "firstPage/nextPage loop": If the loop is still too slow, try to unroll the loop.
See the StateBufferLoop example:
https://github.com/olikraus/u8g2/blob/master/sys/arduino/u8g2_page_buffer/StateBufferLoop/StateBufferLoop.ino
Q: How can I generate my own font.
A: The font must be available in bdf file format. Then use bdfconv to generate

View File

@ -15,6 +15,9 @@ rm ./../../../../U8g2_Arduino/src/clib/u8x8_d_stdio.c
# page buffer
mkdir ../../../../U8g2_Arduino/examples/page_buffer/StateBufferLoop
cp ../../../sys/arduino/u8g2_page_buffer/StateBufferLoop/*.ino ../../../../U8g2_Arduino/examples/page_buffer/StateBufferLoop/.
mkdir ../../../../U8g2_Arduino/examples/page_buffer/Serial
cp ../../../sys/arduino/u8g2_page_buffer/Serial/*.ino ../../../../U8g2_Arduino/examples/page_buffer/Serial/.