tim003 tim003
/
Zadatak_1
Granulo Eldar Mehanovic Adnan
Embed:
(wiki syntax)
Show/hide line numbers
main.cpp
00001 #include "mbed.h" 00002 #include <cmath> 00003 00004 AnalogOut oscilloscope(PTE30); 00005 double function(double x) 00006 { 00007 return sin(x) / 2 + 0.5; 00008 } 00009 00010 int main() 00011 { 00012 while(1) { 00013 for (double i = 0; i < 6.28; i += 0.0628) { 00014 oscilloscope = function (i) / 3.3; 00015 wait_us(15); 00016 } 00017 } 00018 }
Generated on Sat Aug 6 2022 14:05:38 by 1.7.2