Serial3.setup (115200, {rx: P0, tx: P1});
var lastData;
var gps = require ("GPS"). connect (Serial3, function (data) {
if (lastData) {
// do stuff here - eg. the difference between the two readings
var dlat =data.time;
// var dlon = data.lon - lastData.lon;
console.log (dlat);
console.log ('*->',lastData);
}
lastData = data.time;
// return lastData;
});
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Wow great. it works!!!