SSD1308 OLED on NUCLEO-L053R8
Dependencies: SSD1308_128x64_I2C mbed
main.cpp@0:7f6e71b14fd0, 2015-03-17 (annotated)
- Committer:
- kcy
- Date:
- Tue Mar 17 03:35:46 2015 +0000
- Revision:
- 0:7f6e71b14fd0
First version
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kcy | 0:7f6e71b14fd0 | 1 | #include "mbed.h" |
kcy | 0:7f6e71b14fd0 | 2 | #include "SSD1308.h" |
kcy | 0:7f6e71b14fd0 | 3 | |
kcy | 0:7f6e71b14fd0 | 4 | I2C i2c(I2C_SDA, I2C_SCL); |
kcy | 0:7f6e71b14fd0 | 5 | |
kcy | 0:7f6e71b14fd0 | 6 | SSD1308 oled(i2c); |
kcy | 0:7f6e71b14fd0 | 7 | |
kcy | 0:7f6e71b14fd0 | 8 | int main() { |
kcy | 0:7f6e71b14fd0 | 9 | oled.initialize(); |
kcy | 0:7f6e71b14fd0 | 10 | oled.clearDisplay(); |
kcy | 0:7f6e71b14fd0 | 11 | oled.fillDisplay(); |
kcy | 0:7f6e71b14fd0 | 12 | oled.writeString(0, 0, "Hello"); |
kcy | 0:7f6e71b14fd0 | 13 | oled.writeString(1, 0, "Nucleo-L053R8"); |
kcy | 0:7f6e71b14fd0 | 14 | while(1); |
kcy | 0:7f6e71b14fd0 | 15 | } |