Created
March 27, 2022 10:51
-
-
Save EDISON-SCIENCE-CORNER/bc62f9bad26c64349a934ca3e4007cbe to your computer and use it in GitHub Desktop.
This file contains 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 characters
#include "max6675.h" | |
#include <U8g2lib.h> | |
#include <Wire.h> | |
U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0); | |
int thermoDO = 4; | |
int thermoCS = 5; | |
int thermoCLK = 6; | |
MAX6675 thermocouple(thermoCLK, thermoCS, thermoDO); | |
void setup() { | |
u8g2.begin(); | |
u8g2.setFont(u8g2_font_lucasarts_scumm_subtitle_o_tr); | |
u8g2.setCursor(30, 16); | |
u8g2.print("THERMO"); | |
u8g2.setCursor(37, 32); | |
u8g2.print("METER"); | |
u8g2.sendBuffer(); | |
delay(6000); | |
} | |
void loop() { | |
u8g2.clearBuffer(); | |
u8g2.setFont(u8g2_font_maniac_tr); | |
u8g2.setCursor(1, 30); | |
u8g2.print(" "); | |
u8g2.println(thermocouple.readCelsius()); | |
u8g2.setFont(u8g2_font_timB24_tn); | |
u8g2.setCursor(102, 11); | |
u8g2.print("."); | |
u8g2.setFont(u8g2_font_bubble_tr); | |
u8g2.setCursor(99, 30); | |
u8g2.print(" C "); | |
u8g2.sendBuffer(); | |
delay(1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment