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.
Dependencies: mbed
Fork of Lab1_Part9 by
main.cpp
- Committer:
- bjs9
- Date:
- 2018-01-31
- Revision:
- 3:e09fd735ed93
- Parent:
- 2:29ca1063cbc3
- Child:
- 4:e4aed7bf3e21
File content as of revision 3:e09fd735ed93:
#include "mbed.h"
#include <math.h>
#ifndef M_PI
#define M_PI 3.1415
#endif
AnalogOut aout(p18);
float value = 0.0f;
int main()
{
const double pi = 3.141592653589793238462;
while (1) {
for(int i= 0; i < 20; i++ ){
aout = sin(2 *pi * i/20);
//printf("aout = %1.2f volts\n",aout.read());
}
}
}
