2019-06-12 19:18:37 +00:00
|
|
|
#include <Arduino.h>
|
2019-06-13 13:13:03 +00:00
|
|
|
#include <TinyGPS++.h>
|
2019-06-12 19:18:37 +00:00
|
|
|
|
|
|
|
#include "settings.h"
|
2019-06-13 13:33:08 +00:00
|
|
|
#include "random.h"
|
2019-06-12 19:18:37 +00:00
|
|
|
#include "gps.h"
|
|
|
|
|
2019-06-13 13:33:08 +00:00
|
|
|
|
2019-06-12 19:18:37 +00:00
|
|
|
void setup() {
|
|
|
|
Serial.begin(BAUD_PC);
|
|
|
|
|
2019-06-13 13:33:08 +00:00
|
|
|
random_begin();
|
|
|
|
|
|
|
|
|
2019-06-12 19:18:37 +00:00
|
|
|
gps_begin();
|
2019-06-13 13:33:08 +00:00
|
|
|
TinyGPSLocation loc = gps_location();
|
2019-06-13 13:13:03 +00:00
|
|
|
gps_end();
|
|
|
|
|
2019-06-13 13:33:08 +00:00
|
|
|
Serial.print("[main] Location: ("); Serial.print(loc.lat()); Serial.print(", "); Serial.print(loc.lng()); Serial.println();
|
2019-06-12 19:18:37 +00:00
|
|
|
|
2019-06-13 13:33:08 +00:00
|
|
|
uint32_t id = random_get();
|
2019-06-12 19:18:37 +00:00
|
|
|
|
2019-06-13 13:33:08 +00:00
|
|
|
Serial.print("[main] id: ");
|
|
|
|
Serial.println(id);
|
2019-06-12 19:18:37 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void loop() {
|
|
|
|
|
|
|
|
}
|