Display a static bitmap on the OLED.
Dependencies: SSD1308_128x64_I2C
main.cpp@0:f00fb951da7f, 2019-12-11 (annotated)
- Committer:
- dcj001
- Date:
- Wed Dec 11 16:42:43 2019 +0000
- Revision:
- 0:f00fb951da7f
Display a static bitmap on the OLED.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dcj001 | 0:f00fb951da7f | 1 | #include "mbed.h" |
dcj001 | 0:f00fb951da7f | 2 | #include "SSD1308.h" |
dcj001 | 0:f00fb951da7f | 3 | #include "bitmap.h" |
dcj001 | 0:f00fb951da7f | 4 | #include "bitmap2.h" |
dcj001 | 0:f00fb951da7f | 5 | #include "bitmap3.h" |
dcj001 | 0:f00fb951da7f | 6 | |
dcj001 | 0:f00fb951da7f | 7 | I2C i2c(PB_9,PB_8); //The OLED uses port I2C to connect to the L073RZ |
dcj001 | 0:f00fb951da7f | 8 | SSD1308 oled = SSD1308(&i2c, SSD1308_SA0); |
dcj001 | 0:f00fb951da7f | 9 | |
dcj001 | 0:f00fb951da7f | 10 | int main() { |
dcj001 | 0:f00fb951da7f | 11 | //oled.setDisplayInverse(); |
dcj001 | 0:f00fb951da7f | 12 | oled.setDisplayNormal(); |
dcj001 | 0:f00fb951da7f | 13 | oled.writeBitmap((std::uint8_t *) bitmap3); |
dcj001 | 0:f00fb951da7f | 14 | |
dcj001 | 0:f00fb951da7f | 15 | return 0; |
dcj001 | 0:f00fb951da7f | 16 | } |