attempted screen hello world
This commit is contained in:
parent
5828400137
commit
aeed86ec09
1 changed files with 7 additions and 3 deletions
|
|
@ -4,7 +4,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
//screen setup
|
//screen setup
|
||||||
U8G2_SH1106_128X64_NONAME_F_4W_HW_SPI u8g2(U8G2_R2, 17, 21, 20);
|
U8G2_SH1106_128X64_NONAME_F_4W_HW_SPI u8g2(U8G2_R2, 17, 20, 21);
|
||||||
uint8_t *buf;
|
uint8_t *buf;
|
||||||
char outString[99];
|
char outString[99];
|
||||||
|
|
||||||
|
|
@ -15,9 +15,13 @@ void setup() {
|
||||||
u8g2.initDisplay();
|
u8g2.initDisplay();
|
||||||
u8g2.clearDisplay();
|
u8g2.clearDisplay();
|
||||||
u8g2.setPowerSave(0);
|
u8g2.setPowerSave(0);
|
||||||
|
u8g2.setFont(u8g2_font_ncenB14_tr);
|
||||||
|
|
||||||
|
u8g2.clearBuffer();
|
||||||
|
sprintf(outString,"helloworld");
|
||||||
|
u8g2.drawStr(7,35,outString);
|
||||||
|
u8g2.sendBuffer();
|
||||||
}
|
}
|
||||||
//windows test
|
|
||||||
//linux test
|
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
// put your main code here, to run repeatedly:
|
// put your main code here, to run repeatedly:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue