Last active
November 22, 2021 18:30
-
-
Save tlrobinson/dd8cf7d0638bdf49f64812a77f7a798c to your computer and use it in GitHub Desktop.
Revisions
-
tlrobinson revised this gist
Jan 5, 2020 . 1 changed file with 25 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,29 +1,44 @@ #include <Wire.h> // Only needed for Arduino 1.6.5 and earlier #include "SSD1306Wire.h" // legacy: #include "SSD1306.h" // TTGO LoRa32-OLED V1 // // #define OLED_SDA 4 // #define OLED_SCL 15 // #define OLED_RST 16 // TTGO LoRa32-OLED v2.0 and V2.1 // // #define OLED_SDA 21 // #define OLED_SCL 22 // #define OLED_RST NOT_A_PIN SSD1306Wire display(0x3c, OLED_SDA, OLED_SCL); void setup() { Serial.begin(9600); delay(100); Serial.println("hello world"); // reset the OLED: if (OLED_RST != NOT_A_PIN) { pinMode(OLED_RST, OUTPUT); digitalWrite(OLED_RST, LOW); // set GPIO16 low to reset OLED delay(50); digitalWrite(OLED_RST, HIGH); // while OLED is running, must set GPIO16 in high } display.init(); display.flipScreenVertically(); display.clear(); display.setFont(ArialMT_Plain_10); display.drawString(0, 0, "Hello world"); display.display(); } void loop() { } -
tlrobinson revised this gist
Jan 3, 2020 . No changes.There are no files selected for viewing
-
tlrobinson revised this gist
Jan 3, 2020 . 1 changed file with 12 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,26 +1,29 @@ #include <Wire.h> // Only needed for Arduino 1.6.5 and earlier #include "SSD1306Wire.h" // legacy: #include "SSD1306.h" // TTGO LoRa32-OLED V1 // // #define OLED_SDA 4 // #define OLED_SCL 15 // #define OLED_RST 16 SSD1306Wire display(0x3c, OLED_SDA, OLED_SCL); void setup() { // reset the OLED: pinMode(OLED_RST, OUTPUT); digitalWrite(OLED_RST, LOW); // set GPIO16 low to reset OLED delay(50); digitalWrite(OLED_RST, HIGH); // while OLED is running, must set GPIO16 in high display.init(); display.flipScreenVertically(); display.clear(); display.setFont(ArialMT_Plain_10); display.drawString(0, 0, "Hello world"); display.display(); } void loop() { } -
tlrobinson revised this gist
Jan 3, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ #include <Wire.h> // Only needed for Arduino 1.6.5 and earlier #include "SSD1306Wire.h" // legacy: #include "SSD1306.h" SSD1306Wire display(0x3c, OLED_SDA, OLED_SCL); void setup() { pinMode(16, OUTPUT); -
tlrobinson created this gist
Jan 3, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ #include <Wire.h> // Only needed for Arduino 1.6.5 and earlier #include "SSD1306Wire.h" // legacy: #include "SSD1306.h" SSD1306Wire display(0x3c, 4, 15); void setup() { pinMode(16, OUTPUT); digitalWrite(16, LOW); // set GPIO16 low to reset OLED delay(50); digitalWrite(16, HIGH); // while OLED is running, must set GPIO16 in high display.init(); display.flipScreenVertically(); display.setFont(ArialMT_Plain_10); display.setTextAlignment(TEXT_ALIGN_LEFT); display.clear(); display.drawStringMaxWidth(0, 0, 128, "Lorem ipsum\n dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore." ); display.display(); } void loop() { }