mirror of
https://gitlab.dit.htwk-leipzig.de/phillip.kuehne/dezibot.git
synced 2025-07-05 02:01:42 +02:00
WIP: implementing basic displaycontrols
This commit is contained in:
37
src/display/Display.h
Normal file
37
src/display/Display.h
Normal 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
|
Reference in New Issue
Block a user