WIP: implementing basic displaycontrols

This commit is contained in:
Hans Haupt
2024-05-29 00:41:11 +02:00
parent f41de7378f
commit b1a0bc32bc
3 changed files with 218 additions and 0 deletions

37
src/display/Display.h Normal file
View File

@ -0,0 +1,37 @@
/**
* @file InfraredLight.h
* @author Hans Haupt (hans.haupt@dezibot.de)
* @brief Adds the ability to print to the display of the robot.
* @version 0.1
* @date 2024-05-24
*
* @copyright Copyright (c) 2024
*
*/
#ifndef Display_h
#define Display_h
#include <stdint.h>
#include <Arduino.h>
#include "DisplayCMDs.h"
#define display
class Display{
protected:
//how many chars are on current line
uint8_t charsOnCurrLine = 0;
//on which line are we currently printing
uint8_t currLine = 0;
void sendDisplayCMD(uint8_t cmd);
void updateLine(uint charAmount);
public:
void begin(void);
void clear(void);
void print(char *value);
void println(char *value);
void print(int value);
};
#endif //Display_h