Repost: Working code stops working when GPS shield attached.

Home Forums Hardware Freakduino Repost: Working code stops working when GPS shield attached.

This topic contains 3 replies, has 1 voice, and was last updated by  akiba September 4, 2017 at 5:53 am.

  • Author
    Posts
  • #420

    akiba
    Keymaster

    I have 3 Freakduino Long Range 900MHz and I have gotten them to talk to each other using the below code, which is slightly modified from the example 3 code they provided. When I run it without the iteadstudio GPS Shield http://imall.iteadstudio.com/im120417017.html, it performs as expected. When I attach the GPS shield, it loops once or twice and then stops. When I attach the GPS Shield to a regular Arduino and run the example code that came with the board on it, it does not stop running, so I don’t think the GPS Shield is defective.

    Any ideas what is causing this and how I can fix it?

    Akiba
    FreakLabs Open Source Wireless
    Twitter: @freaklabs
    Facebook: https://www.facebook.com/freaklabswireless

  • #421

    akiba
    Keymaster

    After more troubleshooting today, I determined the line causing the issue is this one:
    chibiTx(BROADCAST_ADDR, msg, strlen((char *)msg)+1);

    If I comment that line out, it loops indefinitely. If I put it back in, it stops after a few loops.
    walt

    Posts: 5
    Joined: Sun May 18, 2014 3:53 am

    Akiba
    FreakLabs Open Source Wireless
    Twitter: @freaklabs
    Facebook: https://www.facebook.com/freaklabswireless

  • #422

    akiba
    Keymaster

    I finally ordered a Dexter Industries GPS shield with built in antenna, and it works when I replaced the iteadstudio with it. It uses it’s own library instead of TinyGPS, so maybe that was the issue. So, anyway, I suggest using the Dexter GPS shields if you want you want your Freakduinos to report their location.

    Akiba
    FreakLabs Open Source Wireless
    Twitter: @freaklabs
    Facebook: https://www.facebook.com/freaklabswireless

  • #423

    akiba
    Keymaster

    Ahhh, I think the problem is that the GPS used software serial. The Arduino software serial library causes problems because it takes over all the pinchange interrupts on every pin. I use the pinchange interrupt on one of the pins to signal various events on the radio. If the software serial library is used, it needs to be modified so that it doesn’t affect the pin that is used for the radio.
    Sorry you had to run into that problem.
    Akiba

    Akiba
    FreakLabs Open Source Wireless
    Twitter: @freaklabs
    Facebook: https://www.facebook.com/freaklabswireless

You must be logged in to reply to this topic.