Skip to content

Commit

Permalink
Merge pull request #175 from edwinrainville/transfer-configuration-code
Browse files Browse the repository at this point in the history
Set up configuration settings for PPP-RTK receiver and sets up json output from send data to sfy
  • Loading branch information
gauteh authored Oct 4, 2024
2 parents 3f9a605 + 5e012d6 commit 3e2ac53
Show file tree
Hide file tree
Showing 4 changed files with 306 additions and 51 deletions.
3 changes: 3 additions & 0 deletions sfy-buoy/sfy-ext-gps/ext-gps-mod/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
secrets.h
build
*.axf

# Ignore the spartn keys file since these are private codes
spartn_keys.h
24 changes: 7 additions & 17 deletions sfy-buoy/sfy-ext-gps/ext-gps-mod/ext-gps-mod.ino
Original file line number Diff line number Diff line change
@@ -1,29 +1,19 @@
# include "ArduinoJson.h"
# include "gps.h"

// Serial to SFY
// TX1: ~7 / 42
// RX1: ~8 / 38
// ..
// TX1: ~9 / 39
// RX1: ~10 / 40
Uart sfy{1, 40, 39};

void setup()
{
Serial.begin(115200);
Serial.println(F("SFY-RTK bridge"));

setup_gps();

sfy.begin(400000);

JsonDocument doc;
doc["status"] = "startup";
serializeJson(doc, sfy);
// JsonDocument doc;
// doc["status"] = "startup";
// serializeJson(doc, sfy);

pinMode(PPS_PIN, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(PPS_PIN), main_pps, RISING);
attachInterrupt(digitalPinToInterrupt(PPS_PIN), main_pps, FALLING);
}

//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Expand All @@ -36,9 +26,9 @@ void loop()
Serial.print(".");
delay(100);

JsonDocument doc;
doc["loop"] = i;
serializeJson(doc, sfy);
// JsonDocument doc;
// doc["loop"] = i;
// serializeJson(doc, sfy);

i++;
}
Expand Down
Loading

0 comments on commit 3e2ac53

Please sign in to comment.