• Witaj na Forum Arduino Polska! Zapraszamy do rejestracji!
  • Znajdziesz tutaj wiele informacji na temat hardware / software.
Witaj! Logowanie Rejestracja


Ocena wątku:
  • 0 głosów - średnia: 0
  • 1
  • 2
  • 3
  • 4
  • 5
dane z serial port
#22
Biorąc pod uwagę

Kod:
  $GPVTG,,T,,M,0.859,N,1.591,K,A*2B
  $GPGGA,123201.20,5107.94277,N,01706.05690,E,1,07,1.31,165.4,M,40.4,M,,*59
  $GPGSA,A,3,16,30,05,09,02,23,07,,,,,,3.41,1.31,3.15*0C
  $GPGSV,3,1,11,02,31,263,26,04,39,083,21,05,28,306,20,06,21,217,10*76
  $GPGSV,3,2,11,07,71,167,16,09,56,083,17,16,18,040,23,23,28,088,19*71
  $GPGSV,3,3,11,26,02,021,,29,03,327,08,30,40,205,17*4C
  $GPGLL,5107.94277,N,01706.05690,E,123201.20,A,A*6E
  $GPRMC,123201.40,A,5107.94266,N,01706.05687,E,0.660,,301119,,,A*7C
 

Musiał byś odczytywać początki  do tablicy lub mieć stałe początki do porównania i kiedy trafi na "$GPVTG" odczytać do końca znaku "\n" 

I mając to "$GPVTG,,T,,M,0.859,N,1.591,K,A*2B" w tablicy musiał byś wiedzieć czy pozycje które cię interesują się zmieniają czy "N" i "K" to  stałe?? w tej chwili tab[24] do tab[28] to twoje dane które cie interesują.
Arduino zostało wymyślone po to, by robić dobrze jedną prostą rzecz – migać diodą. 
 
Odpowiedź
  


Wiadomości w tym wątku
dane z serial port - przez tabulek - 30-11-2019, 14:35
RE: dane z serial port - przez error105 - 30-11-2019, 15:20
RE: dane z serial port - przez Robson Kerman - 30-11-2019, 18:24
RE: dane z serial port - przez elvis - 30-11-2019, 18:26
RE: dane z serial port - przez Robson Kerman - 30-11-2019, 21:39
RE: dane z serial port - przez elvis - 30-11-2019, 21:59
dane z serial port - przez Robson Kerman - 30-11-2019, 22:53
RE: dane z serial port - przez tabulek - 30-11-2019, 23:12
RE: dane z serial port - przez tabulek - 01-12-2019, 00:09
RE: dane z serial port - przez Robson Kerman - 01-12-2019, 16:20
RE: dane z serial port - przez tabulek - 02-12-2019, 12:05
RE: dane z serial port - przez Robson Kerman - 02-12-2019, 15:07
RE: dane z serial port - przez tabulek - 02-12-2019, 18:24
RE: dane z serial port - przez tabulek - 02-12-2019, 18:30
RE: dane z serial port - przez Robson Kerman - 04-12-2019, 09:35
RE: dane z serial port - przez tabulek - 04-12-2019, 16:27
RE: dane z serial port - przez Robson Kerman - 04-12-2019, 20:27
RE: dane z serial port - przez Jarewa0606 - 04-12-2019, 17:08
RE: dane z serial port - przez tabulek - 05-12-2019, 12:40
RE: dane z serial port - przez Robson Kerman - 05-12-2019, 14:14
RE: dane z serial port - przez tabulek - 25-12-2019, 23:54
RE: dane z serial port - przez Jarewa0606 - 26-12-2019, 11:45

Skocz do:


Przeglądający: 1 gości