Promijenite kod i kreirajte signal glatkog pilastog valnog oblika, uvođenjem finijih koraka u petlju
Dependencies: mbed
Revision 0:941ebef7df9a, committed 2015-05-08
- Comitter:
- markomileticbj
- Date:
- Fri May 08 17:45:40 2015 +0000
- Commit message:
- Promijenite kod i kreirajte signal glatkog pilastog valnog oblika,; uvo?enjem finijih koraka u petlju
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 |
diff -r 000000000000 -r 941ebef7df9a main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri May 08 17:45:40 2015 +0000 @@ -0,0 +1,14 @@ +//Sawtooth waveform on DAC output to view on oscilloscope +#include "mbed.h" +AnalogOut Aout(p18); +float i; +int main() { +while(1) +{ +for (i=0;i<1;i=i+0.01) +{ +Aout=i; +wait(0.0001); +} +} +} \ No newline at end of file
diff -r 000000000000 -r 941ebef7df9a mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri May 08 17:45:40 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/8ab26030e058 \ No newline at end of file