Skip to content

Commit

Permalink
Merge pull request #7 from lloydrichards/feature/SmallerFont
Browse files Browse the repository at this point in the history
Feature/smaller font
  • Loading branch information
lloydrichards authored Apr 15, 2020
2 parents 2dd821c + 035dab7 commit 9daaa57
Show file tree
Hide file tree
Showing 3 changed files with 1,851 additions and 6 deletions.
36 changes: 32 additions & 4 deletions lib/MimirTesting/MimirTesting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <GxEPD.h>
#include <GxGDEH0213B73/GxGDEH0213B73.h>
#include <Fonts/FreeSans9pt7b.h>
#include "epaper_fonts.h"

//Set Screen SPI
#include <GxIO/GxIO_SPI/GxIO_SPI.h>
Expand Down Expand Up @@ -70,13 +71,39 @@ MimirTesting::MimirTesting()
void MimirTesting::initDisplay(int baudRate)
{
display.init(baudRate);
display.setFont(&FreeSans9pt7b);
display.setTextColor(GxEPD_BLACK);
display.setRotation(0);
display.setCursor(2, 20);
display.println("I want...");
display.setCursor(0, 20);

display.setFont(&Lato_Regular_10);
display.print("Temp: ");
display.setFont(&Roboto_Slab_Regular_16);
display.print("21.6");
display.println(" C");
display.println();

display.setFont(&Lato_Regular_10);
display.print("Humi: ");
display.setFont(&Roboto_Slab_Regular_16);
display.print("37");
display.println(" %");
display.println();

display.setFont(&Lato_Regular_10);
display.print("Pres: ");
display.setFont(&Roboto_Slab_Regular_16);
display.print("2199");
display.println(" Hpa");
display.println();

display.setFont(&Lato_Regular_10);
display.print("CO2: ");
display.setFont(&Roboto_Slab_Regular_16);
display.print("1200");
display.println(" ppm");
display.println();
display.println("PANCAKES!");

display.setFont(&Lato_Regular_10);
display.update();
delay(1000);
display.updateWindow(0, 0, GxEPD_WIDTH, GxEPD_HEIGHT, true);
Expand Down Expand Up @@ -353,6 +380,7 @@ void MimirTesting::DisplaySentData(int httpResponseCode, String response)
{
display.fillScreen(GxEPD_WHITE);
display.setCursor(2, 20);

if (httpResponseCode > 0)
{
display.println("Data Sent!");
Expand Down
Loading

0 comments on commit 9daaa57

Please sign in to comment.