diff --git a/examples/StringHandlingExample/StringHandlingExample.ino b/examples/StringHandlingExample/StringHandlingExample.ino new file mode 100644 index 0000000..12c5c83 --- /dev/null +++ b/examples/StringHandlingExample/StringHandlingExample.ino @@ -0,0 +1,20 @@ +/* + Simple test of the ring buffer with strings. +*/ + +#include + +RingBuf myBuffer; + +void setup() { + Serial.begin(9600); + String szavak[8] = {"alma", "fa", "alatt", "ez", "az", "stb", "bbbbb", "cccc"}; + uint8_t i = 0; + while (myBuffer.push(szavak[i++])) + ; + for (uint8_t j = 0; j < myBuffer.size(); j++) + Serial.println(myBuffer[j]); + Serial.println("--------"); +} + +void loop() {} \ No newline at end of file diff --git a/examples/StringHandlingExample/readme.md b/examples/StringHandlingExample/readme.md new file mode 100644 index 0000000..b8aec93 --- /dev/null +++ b/examples/StringHandlingExample/readme.md @@ -0,0 +1,3 @@ +# String example + +This serves as an illustration demonstrating the applicability of this ring buffer solution with strings. \ No newline at end of file