import matplotlib.pyplot as plt import numpy as np sample_rate = 1000 #Hz freq = 5 #Hz duration = 2# seconds num_samples = sample_rate * duration sine_table = (32767 * np.sin(2.0 * np.pi * freq * np.arange(num_samples) / sample_rate)).astype("i2") sine_table.tofile("sine.dat") plt.plot(sine_table) plt.show() print("Now run:") print("target/debug/fl2k_ampliphase -D -c 2000 -s 10000 -i 1000 -f sine.dat")