Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Michal Rybka
openCanSat-2.0-library
Commits
cfd512ed
Commit
cfd512ed
authored
Jul 29, 2018
by
Ondřej Kučera
Browse files
Revert "GPS test example for OpenCansat library added"
This reverts commit
3626f853
parent
3626f853
Changes
1
Hide whitespace changes
Inline
Side-by-side
examples/3-Each-module-examples/GPStest.ino
deleted
100644 → 0
View file @
3626f853
#include
<Wire.h>
#include
"OpenCansatGPS.h"
#define Serial SerialUSB
OpenCansatGPS
gps
;
// CONFIG
const
uint16_t
msDelay
=
2000
;
void
setup
()
{
while
(
!
SerialUSB
)
{}
Serial
.
begin
(
57600
);
Serial
.
println
(
"OpenCansat gps test"
);
gps
.
begin
();
// Uncomment when you wanna see debug prints from library
//gps.debugPrintOn();
}
void
loop
()
{
uint32_t
start
=
millis
();
if
(
gps
.
scan
(
600
*
1000
))
{
Serial
.
println
(
String
(
" time to find fix: "
)
+
(
millis
()
-
start
)
+
String
(
"ms"
));
Serial
.
println
(
String
(
" datetime = "
)
+
gps
.
getDateTimeString
());
Serial
.
println
(
String
(
" lat = "
)
+
String
(
gps
.
getLat
(),
7
));
Serial
.
println
(
String
(
" lon = "
)
+
String
(
gps
.
getLon
(),
7
));
Serial
.
println
(
String
(
" num sats = "
)
+
String
(
gps
.
getNumberOfSatellites
()));
}
else
{
Serial
.
println
(
"No Fix"
);
}
Serial
.
println
(
String
(
"Delay: "
)
+
msDelay
+
String
(
"ms"
));
delay
(
msDelay
);
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment