summaryrefslogtreecommitdiff
path: root/examples/sinewave/sinewave_example.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/sinewave/sinewave_example.cpp')
-rw-r--r--examples/sinewave/sinewave_example.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/examples/sinewave/sinewave_example.cpp b/examples/sinewave/sinewave_example.cpp
new file mode 100644
index 0000000..e6583d6
--- /dev/null
+++ b/examples/sinewave/sinewave_example.cpp
@@ -0,0 +1,20 @@
+#include <hwd.h>
+#include <math.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <iostream>
+
+int main() {
+
+ hwd::sinewave::set_amplitude(11);
+ hwd::sinewave::set_frequency(10);
+ hwd::sinewave::set_phase(30);
+
+ for (int i = 1; i < 1200; i++) {
+ std::cout << hwd::sinewave::get_point() << std::endl;
+
+ }
+
+ return 0;
+}