lab1-part9 sine wave

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
logostarr
Date:
Thu Sep 08 16:41:37 2022 +0000
Commit message:
Lab1-part 9;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Sep 08 16:41:37 2022 +0000
@@ -0,0 +1,12 @@
+#include "mbed.h"
+AnalogOut Aout(p18);
+float i;
+
+int main() {
+    while(1) {
+        for(int i = 0;i < 1; i=+0.005) {
+            Aout= 0.5 + 0.5 * sin(i * 3.14159);
+            wait(0.001);
+        }
+    }
+} 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Sep 08 16:41:37 2022 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file