Connecting the GPS sensor NEO-6M to the STM32 NUCLEO-F401RE microcontroller with the NMEA checksum

Поделиться
HTML-код
  • Опубликовано: 1 фев 2025
  • НаукаНаука

Комментарии • 28

  • @nox3681
    @nox3681 2 года назад +2

    Hello, I really need the link to the code but it's not working anymore, can you send me a new one please ?

  • @geekrafeeq4911
    @geekrafeeq4911 3 года назад +3

    There is a big error in this code. It uses strdup which allocates new memory each iteration. After about 2 min you run out of memory an the code appears to have stopped. To fix this you can either manage your memory with mallac() and free() functions OR you can correctly replace strdup with strcpy (which implies other minor changes to the code). I went the strcpy route and now my gps has been running for a long time with no trouble.

  •  4 года назад +3

    There is a flaw in this code. We have strdup function allocating memory with a relatively big string. Which may and probably will cause a memory leakage ending with a hard fault. Therefore it is critical to deallocate the memory by using a char pointer such as "tofree" in the end of operation. (Tokenizing NMEA sentences.)

    • @ogb.2687
      @ogb.2687 3 года назад

      ahmet bey merhabalar öncelikle, acaba siz kodu çalıştırabildiniz mi bitirme projem için gps'e ihtiyaç duydum fakat bir türlü beceremedim cevaplarsanız çok sevinirim

    •  3 года назад +1

      @@ogb.2687 Link yorumdan atamıyorum, e-posta adresinizi paylaşırsanız Github linkini paylaşabilirim.

    • @minayakarimova
      @minayakarimova 3 года назад

      @ rica ederim bana da gönderirdiz

    •  3 года назад +2

      Göndermeyi pek istemekle beraber, e-posta adreslerini vermediğiniz için bu mümkün değil.

    • @minayakarimova
      @minayakarimova 3 года назад

      @ çok üzgünüm, unutmuşum😄 So sorry. kerimova.minaye@gmail.com

  • @mishab5994
    @mishab5994 3 года назад +1

    Сразу видно, наш человек!!

  • @mreyntjens5823
    @mreyntjens5823 3 года назад +1

    This code should also work with the NEO M8N module?

  • @minayakarimova
    @minayakarimova 3 года назад +1

    Thank you so much

  • @saoz92
    @saoz92 2 года назад

    The code with strdup() causes a stop after 2-3 minutes. Just replace strdup with strcpy(buffStr2, buffStr), set additional memset for buffStr2 before sprintf() and after HAL_UART_Transmit() set memset() for buffStr2, buffStr and token again. The program is running without problems. The link to the code is expired. Could you please replace it?

  • @shivamganore6268
    @shivamganore6268 3 года назад

    after receiving data 10-15 times my *string doesn't storing any data any no data is sending through uart.
    any idea why it is happening.

  • @osmankadayif
    @osmankadayif 3 года назад

    can ı use stm32f407vg this code ?

  • @ishitmehta3057
    @ishitmehta3057 2 года назад

    The code link seems to have gone bad. Can you please update that?

  • @pavelgrigorev4739
    @pavelgrigorev4739 3 года назад

    Nice video! Cool accent though =)

  • @yessicavannesa1032
    @yessicavannesa1032 3 года назад

    The code also works with F103C8?

  • @stevergr9039
    @stevergr9039 4 года назад

    Thanks for the video. Unfortunately I'm getting the error that no ST-Link is connected. Do I even need one for this code and this GPS sensor? Help's always much appreciated :)

  • @sarapahlavan6637
    @sarapahlavan6637 4 года назад +1

    Thank you for this video, But what is the terminal you are using to show because I tried out your code but I didn't saw any thing on Putty from &Uart2! can you guide me about this?

    • @sureshp632
      @sureshp632 4 года назад

      Hi Sara pahlavan sent your code via email sureshgct2010@gmail.com I will try it

    • @thodorispaparrigopoulos8542
      @thodorispaparrigopoulos8542 4 года назад +1

      If the GPS cannot connect to any satellite, then you shouldn't see anything on putty. I had the same issue too, and the solution was very simple, run it outdoors.

    • @sadikyoussef3600
      @sadikyoussef3600 3 года назад +1

      @@sureshp632 i have the same problem, i can't see nothing on Putty, i ll be thankfull, if i get some help.