53 lines
946 B
C++
53 lines
946 B
C++
#ifndef OLED_SCREEN_H
|
|
#define OLED_SCREEN_H
|
|
|
|
#include <Adafruit_SSD1306.h>
|
|
|
|
|
|
class OledScreen {
|
|
public:
|
|
|
|
/**
|
|
* @brief Construct a new Oled Screen object
|
|
*
|
|
* @param screenWidth The width of the screen
|
|
* @param screenHeight The height of the screen
|
|
* @param oledResetPin The pin used to reset the screen (default: -1)
|
|
*/
|
|
OledScreen(int screenWidth, int screenHeight, int oledResetPin = -1);
|
|
|
|
/**
|
|
* @brief display welcome screen
|
|
*/
|
|
void welcome();
|
|
|
|
/**
|
|
* @brief print the total amount on the screen
|
|
*
|
|
* @param amount The total amount to print in centimes
|
|
*/
|
|
void printAmount(int amount);
|
|
|
|
|
|
/**
|
|
* @brief Clear the screen
|
|
*/
|
|
void clear();
|
|
|
|
/**
|
|
* @brief messsage for wifi waiting
|
|
*
|
|
*/
|
|
void wifiWaiting();
|
|
|
|
|
|
void printVal(String distance, String poid, String humitemp);
|
|
|
|
private:
|
|
|
|
Adafruit_SSD1306* display;
|
|
|
|
};
|
|
|
|
|
|
#endif |