Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: main.cpp
- Revision:
- 0:a469fad7d05e
diff -r 000000000000 -r a469fad7d05e main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Dec 17 14:36:46 2015 +0000
@@ -0,0 +1,19 @@
+#include "mbed.h"
+
+#define INPUT_SCALAR (0.01f) //uklanjanje šumova signala
+
+AnalogIn Ain(p20);
+AnalogOut Aout(p18);
+float i;
+float pi=3.14159;
+
+int main()
+{
+ while(1) {
+ for (i=0; i<2; i=i+0.005) {
+ Aout=0.5+0.5*sin(i*pi);
+ wait(Ain*INPUT_SCALAR); //regulacija vremena jedne periode preko potenciometra
+
+ }
+ }
+}
\ No newline at end of file