Adnan Kičin Nurif Dedagić

Dependencies:   mbed

Committer:
tim003
Date:
Mon Mar 31 15:26:23 2014 +0000
Revision:
0:f26ed78adf52
LV5-Grupa3-tim003-zadatak1

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tim003 0:f26ed78adf52 1 #include "mbed.h"
tim003 0:f26ed78adf52 2 #include "math.h"
tim003 0:f26ed78adf52 3 AnalogOut izlaz(PTE30);
tim003 0:f26ed78adf52 4 Ticker t;
tim003 0:f26ed78adf52 5 float frekvencija=1000;
tim003 0:f26ed78adf52 6 float pi=3.14159265359;
tim003 0:f26ed78adf52 7 float omega=2*pi*frekvencija;
tim003 0:f26ed78adf52 8 int i(0);
tim003 0:f26ed78adf52 9 void funkcija(){
tim003 0:f26ed78adf52 10 izlaz=(0.5/3.3) + (0.5/3.3)*sin(omega*i*0.0001);
tim003 0:f26ed78adf52 11 i++;
tim003 0:f26ed78adf52 12 if(i==100) i=0;
tim003 0:f26ed78adf52 13 }
tim003 0:f26ed78adf52 14
tim003 0:f26ed78adf52 15 int main() {
tim003 0:f26ed78adf52 16 t.attach_us(&funkcija, 250);
tim003 0:f26ed78adf52 17 while(1){}
tim003 0:f26ed78adf52 18 }