From 3a7e3d97df4e48d25269021bcd39b956a5ba65ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mari=C3=A1n?= Date: Mon, 2 Nov 2020 13:34:14 +0100 Subject: [PATCH] Add files via upload --- main.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/main.c b/main.c index da97274..af4932e 100644 --- a/main.c +++ b/main.c @@ -15,6 +15,7 @@ */ // include libraries +#include #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;