Nathan Yonkee
/
Nucleo_sinewave_output_copy
init
Diff: main.cpp
- Revision:
- 4:6a66cf97f2cf
- Parent:
- 3:f4b02d11940b
- Child:
- 6:1b7486249c9a
--- a/main.cpp Tue Sep 30 08:31:56 2014 +0000 +++ b/main.cpp Wed Mar 16 16:46:53 2016 +0000 @@ -5,8 +5,8 @@ #define PI (3.141592653589793238462) #define AMPLITUDE (1.0) // x * 3.3V #define PHASE (PI * 1) // 2*pi is one period -#define RANGE (4096/2) // 12 bits DAC -#define OFFSET (4096/2) // 12 bits DAC +#define RANGE (0x7FFF) +#define OFFSET (0x7FFF) // Configuration for sinewave output #define BUFFER_SIZE (360) @@ -15,6 +15,7 @@ void calculate_sinewave(void); int main() { + printf("Sinewave example\n"); calculate_sinewave(); while(1) { // sinewave output