Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions examples/StringHandlingExample/StringHandlingExample.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
Simple test of the ring buffer with strings.
*/

#include <RingBuf.h>

RingBuf<String, 8> 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() {}
3 changes: 3 additions & 0 deletions examples/StringHandlingExample/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# String example

This serves as an illustration demonstrating the applicability of this ring buffer solution with strings.