• OK, I have returned to this project finally.

    The GPS unit (ublox Neo-6m-0-001) works fine, takes about a minute before it gets a "fix".

    Got BT working, so I can read the SD card remotely.

    The problem I am having now is understanding how to turn off the GPS unit, I mean it needs to be powered off for 4 hours until its next wake up call. I am guessing that cold starting the GPS will consume far less power than keeping it powered on (warm?).

    This is inside a setInterval() loop - I was thinking of setting a flag to break myself out of the setInterval() loop, but now am doubting that is the correct way to think about this.

    bGotFix = 0;
      
      var gps = require("GPS").connect(Serial4, function(data){
        
        if(data.fix == 1) {
    // todo this will be logged to sd card
           console.log(data.time, data,lat, data.lon);
           bGotFix = 1;
        } else {
    // debug
           console.log('no fix yet');
        }
        
      });
    

    Traditionally I'd check data.fix is true, stop the interval code, but how to turn off the GPS? Or do I need to?

About

Avatar for CoffeeCups @CoffeeCups started