tim003 tim003
/
Zadatak_1
Granulo Eldar Mehanovic Adnan
Diff: main.cpp
- Revision:
- 0:4662d250bc92
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Mar 31 09:18:45 2014 +0000 @@ -0,0 +1,18 @@ +#include "mbed.h" +#include <cmath> + +AnalogOut oscilloscope(PTE30); +double function(double x) +{ + return sin(x) / 2 + 0.5; +} + +int main() +{ + while(1) { + for (double i = 0; i < 6.28; i += 0.0628) { + oscilloscope = function (i) / 3.3; + wait_us(15); + } + } +}