Last active
December 19, 2020 05:49
-
-
Save pawl/73a1ccfbf2b2be6f934e651b39c51082 to your computer and use it in GitHub Desktop.
Revisions
-
pawl revised this gist
Dec 19, 2020 . 1 changed file with 4 additions and 0 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 @@ -2,6 +2,10 @@ // also: // https://randomnerdtutorials.com/esp32-ssd1306-oled-display-arduino-ide/ // http://www.esp32learning.com/code/esp32-and-max6675-example.php // parts: // * HiLetgo DC 3-5V MAX6675 Module + K Type Thermocouple Temperature Sensor // * UCTRONICS 0.96 Inch OLED Module 12864 128x64 Yellow Blue SSD1306 Driver I2C // * ESP32 #include <max6675.h> #include <Wire.h> -
pawl revised this gist
Dec 19, 2020 . 1 changed file with 1 addition and 0 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 @@ -5,6 +5,7 @@ #include <max6675.h> #include <Wire.h> // also requires Adafruit Bus IO Library #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> -
pawl revised this gist
Dec 19, 2020 . No changes.There are no files selected for viewing
-
pawl created this gist
Dec 19, 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,51 @@ // based on the lcdthermocouple example // also: // https://randomnerdtutorials.com/esp32-ssd1306-oled-display-arduino-ide/ // http://www.esp32learning.com/code/esp32-and-max6675-example.php #include <max6675.h> #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #define SCREEN_WIDTH 128 // OLED display width, in pixels #define SCREEN_HEIGHT 64 // OLED display height, in pixels int thermoDO = 19; // SO int thermoCS = 23; int thermoCLK = 5; // SCK MAX6675 thermocouple(thermoCLK, thermoCS, thermoDO); // Declaration for an SSD1306 display connected to I2C (SDA, SCL pins) Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1); void setup() { Serial.begin(9600); if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { // Address 0x3D for 128x64 Serial.println(F("SSD1306 allocation failed")); for(;;); } delay(2000); } void loop() { display.clearDisplay(); display.setTextSize(1); display.setTextColor(WHITE); display.setCursor(0, 1); display.println("Paul's Thermometer"); display.setTextSize(5); display.setTextColor(WHITE); display.setCursor(0, 20); display.print((int) thermocouple.readFahrenheit()); display.println("F"); display.display(); delay(200); }