Skip to content

MyrtIO/ring-buffer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

RingBuffer Tests

A simple C++ ring buffer. Can be used with Arduino Framework as it implements Stream interface.

Usage

#include <Arduino.h>
#include <RingBuffer.h>

RingBuffer<2> buffer;

void loop() {
    buffer.write(millis());
    buffer.write(millis());
    while (buffer.available() > 0) {
        Serial.println(buffer.read());
    }
}