Description

⚙ Hardware Needed


📚 External Libraries Needed


None

📑 Code


import time

dataset = []

while True:
    # quickly fill our dataset buffer
    # (if you wanted it even faster, remove monotonic_ns() and interpolate after)
    for _ in range(1000):
        dataset.append((time.monotonic_ns(),12345)) # '12345' represents our data

    # print to serial (line by line)
    for line in dataset:
        print('{:.9E},{:.9E}'.format(line[0],line[1]))

    # restart loop, save to SD card, etc...

Details