Add files via upload

This commit is contained in:
Marián 2020-11-02 13:34:14 +01:00 committed by GitHub
parent e879a58bf9
commit 3a7e3d97df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

21
main.c
View File

@ -15,6 +15,7 @@
*/
// include libraries
#include <stdio.h>
#include "lib/ssd1306.h"
/**
@ -31,18 +32,16 @@ int main(void)
// clear screen
SSD1306_ClearScreen();
// set position
SSD1306_SetPosition(5, 0);
// draw line
SSD1306_DrawLineHorizontal(4, 4, 115);
// set position x, y
SSD1306_SetPosition(5, 1);
// draw string
SSD1306_DrawString(" 0.96\" OLED SSD1306");
// set position
SSD1306_SetPosition(30, 1);
// draw string
SSD1306_DrawString("by Matiasus");
SSD1306_DrawString("SSD1306 OLED DRIVER");
// draw line
SSD1306_DrawLineHorizontal(4, 18, 115);
// update
SSD1306_UpdateScreen();
// return value
return 0;