tim007 tim007
/
LV51
Revision 0:ea1a6e5d4060, committed 2014-03-31
- Comitter:
- tim007
- Date:
- Mon Mar 31 07:11:30 2014 +0000
- Commit message:
- LV5-PAI-Grupa1-Tim007-Zad1
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Mar 31 07:11:30 2014 +0000 @@ -0,0 +1,25 @@ +#include "mbed.h" +#include "math.h" +#define freq 1000 + +AnalogOut aout(PTE30); + +Ticker tick; + +double step=0.1f; +int i=0; + +void sawFunc() +{ + aout=(1./3.3)*(1-step*i); + i++; + if(i>10) + { + i=0; + } +} +int main() +{ + tick.attach_us(&sawFunc,50); + while(1) { } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Mar 31 07:11:30 2014 +0000 @@ -0,0 +1,1 @@ +http://world3.dev.mbed.org/users/mbed_official/code/mbed/builds/824293ae5e43 \ No newline at end of file