// TextEncoder.h #ifndef _TEXTENCODER_h #define _TEXTENCODER_h #if defined(ARDUINO) && ARDUINO >= 100 #include "arduino.h" #else #include "WProgram.h" #endif class TextEncoder { private: uint16_t size; uint16_t current_index; byte* data = nullptr; public: TextEncoder(); TextEncoder(String text); ~TextEncoder(); public: void EncodeText(String text); public: bool HasNextChar(); bool IsLastChar(); void GetNextChar(byte& bit1, byte& bit2); }; #endif