mirror of
https://github.com/Matiasus/SSD1306.git
synced 2024-10-03 18:18:46 -04:00
Add files via upload
This commit is contained in:
parent
e879a58bf9
commit
3a7e3d97df
21
main.c
21
main.c
@ -15,6 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// include libraries
|
// include libraries
|
||||||
|
#include <stdio.h>
|
||||||
#include "lib/ssd1306.h"
|
#include "lib/ssd1306.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -31,18 +32,16 @@ int main(void)
|
|||||||
|
|
||||||
// clear screen
|
// clear screen
|
||||||
SSD1306_ClearScreen();
|
SSD1306_ClearScreen();
|
||||||
|
// draw line
|
||||||
// set position
|
SSD1306_DrawLineHorizontal(4, 4, 115);
|
||||||
SSD1306_SetPosition(5, 0);
|
// set position x, y
|
||||||
|
SSD1306_SetPosition(5, 1);
|
||||||
// draw string
|
// draw string
|
||||||
SSD1306_DrawString(" 0.96\" OLED SSD1306");
|
SSD1306_DrawString("SSD1306 OLED DRIVER");
|
||||||
|
// draw line
|
||||||
// set position
|
SSD1306_DrawLineHorizontal(4, 18, 115);
|
||||||
SSD1306_SetPosition(30, 1);
|
// update
|
||||||
|
SSD1306_UpdateScreen();
|
||||||
// draw string
|
|
||||||
SSD1306_DrawString("by Matiasus");
|
|
||||||
|
|
||||||
// return value
|
// return value
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user