Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
- Committer:
- domemort
- Date:
- 2021-11-03
- Revision:
- 0:831544bc8e73
File content as of revision 0:831544bc8e73:
#include "mbed.h"
PwmOut sine(D6);
static float samples[]={0.5000, 0.6623, 0.8071, 0.9186, 0.9847, 0.9983, 0.9579, 0.8679, 0.7380, 0.5823, 0.4177, 0.2620, 0.1321, 0.0421, 0.0017, 0.0153, 0.0814, 0.1929, 0.3377, 0.5000};
int main(){
sine.period_us(100);
while (1){
for(int i=0; i<2; i=i++){
sine=samples[i];
wait(0.01);
}
}
}