This is lab2 of 4180 dealing with the extra parts kit.
Dependencies: mbed LSM9DS1_Library_cal
Diff: Jesses_Lab2/Jesses_Main.cpp
- Revision:
- 3:8e9172f7d119
- Parent:
- 2:4401fc907d45
- Child:
- 4:1443e98048a6
diff -r 4401fc907d45 -r 8e9172f7d119 Jesses_Lab2/Jesses_Main.cpp --- a/Jesses_Lab2/Jesses_Main.cpp Fri Feb 12 11:40:01 2016 -0500 +++ b/Jesses_Lab2/Jesses_Main.cpp Fri Feb 12 17:37:34 2016 +0000 @@ -1,19 +1,16 @@ // <- remove this if you want to code this and comment Georges #include "mbed.h" -#include "DebounceIn.h" -#include "PinDetect.h" AnalogOut aout(p18); -int main() -{ +int main(){ const double pi = 3.141592653589793238462; - const double amplitude = 0.5f; + const double amplitude = 1; const double offset = 65535/2; double rads = 0.0; uint16_t sample = 0; - - while(1) { + + while(1){ // sinewave output for (int i = 0; i < 360; i++) { rads = (pi * i) / 180.0f; @@ -22,3 +19,4 @@ } } } +