GPS Lora
Dependencies: LoRaWAN-lib MODGPS
main.cpp@0:f46da4ed04ab, 2016-12-28 (annotated)
- Committer:
- afeezaziz
- Date:
- Wed Dec 28 07:22:55 2016 +0000
- Revision:
- 0:f46da4ed04ab
init
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
afeezaziz | 0:f46da4ed04ab | 1 | #include "mbed.h" |
afeezaziz | 0:f46da4ed04ab | 2 | |
afeezaziz | 0:f46da4ed04ab | 3 | AnalogOut my_output(PA_4); |
afeezaziz | 0:f46da4ed04ab | 4 | |
afeezaziz | 0:f46da4ed04ab | 5 | #define PI (3.141592653589793238462) |
afeezaziz | 0:f46da4ed04ab | 6 | #define AMPLITUDE (1.0) // x * 3.3V |
afeezaziz | 0:f46da4ed04ab | 7 | #define PHASE (PI * 1) // 2*pi is one period |
afeezaziz | 0:f46da4ed04ab | 8 | #define RANGE (0x7FFF) |
afeezaziz | 0:f46da4ed04ab | 9 | #define OFFSET (0x7FFF) |
afeezaziz | 0:f46da4ed04ab | 10 | |
afeezaziz | 0:f46da4ed04ab | 11 | // Configuration for sinewave output |
afeezaziz | 0:f46da4ed04ab | 12 | #define BUFFER_SIZE (360) |
afeezaziz | 0:f46da4ed04ab | 13 | uint16_t buffer[BUFFER_SIZE]; |
afeezaziz | 0:f46da4ed04ab | 14 | |
afeezaziz | 0:f46da4ed04ab | 15 | void calculate_sinewave(void); |
afeezaziz | 0:f46da4ed04ab | 16 | |
afeezaziz | 0:f46da4ed04ab | 17 | int main() { |
afeezaziz | 0:f46da4ed04ab | 18 | |
afeezaziz | 0:f46da4ed04ab | 19 | } |