2016-06-14 20:26:46 +02:00
# U8g2 Package Test
## About
This is a test application for the U8g2 package. This package is a graphical display library, including display drivers.
## Usage
This test application will initialize the U8g2 to output on one of the following:
2016-06-22 22:51:32 +02:00
* output to terminal virtual screen.
2016-06-14 20:26:46 +02:00
* output to SDL virtual screen.
* output to I2C graphics screen.
* output to SPI graphics screen.
2019-01-03 00:39:56 +01:00
Note: you may have to run `make clean` after you changed to a different output mode.
2016-06-22 22:51:32 +02:00
### Output to terminal
2016-07-28 00:12:05 +02:00
To output to this virtual screen, supply `TEST_OUTPUT=1` to the `make` command.
2016-06-14 20:26:46 +02:00
### Output to SDL
2016-07-28 00:12:05 +02:00
To output to this virtual screen, supply `TEST_OUTPUT=2` to the `make` command.
2016-06-14 20:26:46 +02:00
2016-06-22 22:51:32 +02:00
This is a native-only option and requires SDL (32-bits) to be installed.
2016-06-14 20:26:46 +02:00
### Output to SPI
2016-07-28 00:12:05 +02:00
To output to screen, supply `TEST_OUTPUT=3` to the `make` command.
2016-06-14 20:26:46 +02:00
2016-07-28 00:12:05 +02:00
* `TEST_SPI` — The SPI device.
* `TEST_PIN_CS` — If applicable, the CS pin.
2019-01-03 00:39:56 +01:00
* `TEST_PIN_DC` — If applicable, the Data/Command pin.
2016-07-28 00:12:05 +02:00
* `TEST_PIN_RESET` — If applicable, the reset pin.
* `TEST_DISPLAY` — The used display driver (see https://github.com/olikraus/u8g2/wiki/u8g2setupc). Make sure you select a SPI compatible display.
2016-06-14 20:26:46 +02:00
### Output to I2C
2016-07-28 00:12:05 +02:00
To output to screen, supply `TEST_OUTPUT=4` to the `make` command.
2016-06-14 20:26:46 +02:00
Furthermore, you can configure the following:
2016-07-28 00:12:05 +02:00
* `TEST_I2C` — The I2C device.
* `TEST_ADDR` — The address to write commands to.
* `TEST_PIN_RESET` — If applicable, the reset pin.
* `TEST_DISPLAY` — The used display driver (see https://github.com/olikraus/u8g2/wiki/u8g2setupc). Make sure you select an I2C compatible display.
2016-06-14 20:26:46 +02:00
## Expected result
The output of this test depends on the output mode and used hardware. If it works, the application cycles through three screens with the text: 'This is RIOT-OS'.