Granulo Eldar Mehanovic Adnan

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

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 }