File tree Expand file tree Collapse file tree 1 file changed +3
-37
lines changed
examples/OLED/OLED_rotate Expand file tree Collapse file tree 1 file changed +3
-37
lines changed Original file line number Diff line number Diff line change 22#include " heltec.h"
33#include " Arduino.h"
44
5+ // rotate only for GEOMETRY_128_64
56 SSD1306Wire display (0x3c , SDA_OLED, SCL_OLED, RST_OLED);
67
7- void printBuffer (void ) {
8- // Initialize the log buffer
9- // allocate memory to store 8 lines of text and 30 chars per line.
10- display.setLogBuffer (5 , 30 );
11-
12- // Some test data
13- const char * test[] = {
14- " Hello" ,
15- " World" ,
16- " ----" ,
17- " Show off" ,
18- " how" ,
19- " the log buffer" ,
20- " is" ,
21- " working." ,
22- " Even" ,
23- " scrolling is" ,
24- " working"
25- };
26-
27- for (uint8_t i = 0 ; i < 11 ; i++) {
28- display.clear ();
29- // Print to the screen
30- display.println (test[i]);
31- // Draw it to the internal screen buffer
32- display.drawLogBuffer (0 , 0 );
33- // Display it on the screen
34- display.display ();
35- delay (500 );
36- }
37- }
38-
398void VextON (void )
409{
4110 pinMode (Vext,OUTPUT);
@@ -58,10 +27,7 @@ void setup() {
5827 display.display ();
5928
6029 display.setContrast (255 );
61-
62- printBuffer ();
63- delay (1000 );
64-
30+
6531 display.setTextAlignment (TEXT_ALIGN_CENTER);
6632 display.clear ();
6733 display.display ();
@@ -96,4 +62,4 @@ void setup() {
9662 delay (2000 );
9763}
9864
99- void loop () { }
65+ void loop () { }
You can’t perform that action at this time.
0 commit comments