DFRobot TEL0051 Manual page 35

Gps/gprs/gsm module v3.0
Hide thumbs Also See for TEL0051:
Table of Contents

Advertisement

42
# e n d i f
43
44
i f ( s t a t = = 0 | | s t a t = = 1 ) {
45
i f ( g p s _ g g a _ i s _ f i x ( ) ) {
46
/ / s e n d _ m e s s a g e ( " 1 8 5 0 1 6 8 3 4 7 5 " , g p s _ g g a _ u t c _ s ( ) ) ;
47
g s m _ s e t _ n u m b l e ( " 1 8 5 0 1 6 8 3 4 7 5 " ) ; / /
48
g s m _ s e n d _ m e s s a g e ( g p s _ g g a _ u t c _ s ( ) ) ;
49
g s m _ s e n d _ m e s s a g e ( g p s _ g g a _ E W ( ) ) ;
50
g s m _ s e n d _ m e s s a g e ( g p s _ g g a _ N S ( ) ) ;
51
g s m _ s e n d _ m e s s a g e ( g p s _ g g a _ l a t _ s ( ) ) ;
52
g s m _ s e n d _ m e s s a g e ( g p s _ g g a _ l o n g _ s ( ) ) ;
53
g s m _ e n d _ s e n d ( ) ;
54
w h i l e ( 1 ) ;
55
}
56
}
57
58
/ /
59
s w i t c h ( s t a t ) {
60
c a s e 0 :
61
# i f d e f D E B U G
62
S e r i a l . p r i n t l n ( " d a t a c h e c k s u m i s o k " ) ;
63
# e n d i f
64
b r e a k ;
65
c a s e 1 :
66
# i f d e f D E B U G
67
S e r i a l . p r i n t l n ( " G P G G A I D i s e r r o r ! " ) ;
68
# e n d i f
69
b r e a k ;
70
c a s e 2 :
71
# i f d e f D E B U G
72
S e r i a l . p r i n t l n ( " d a t a i s e r r o r ! " ) ;
73
# e n d i f
74
b r e a k ;
75
}
76
77
# i f d e f D E B U G
78
S e r i a l . p r i n t l n ( " $ G P G G A d a t a : " ) ;
79
g p s _ g g a _ p r i n t ( ) ;
80
# e n d i f
81
82
83
84
/ *
85
i f ( g p s _ g g a _ i s _ f i x ( ) = = 0 ) / / c h e c k i f i s f i x
86
S e r i a l . p r i n t l n ( " c a n ' t f i x ! p l e a s e g o o u t s i d e ! " ) ;
/ / t r u e i f f i x
/ / f o r t e s t

Advertisement

Table of Contents
loading

Table of Contents