3V3
pin.VCC
pin on the SparkFun GNSS-RTK Dead Reckoning Breakout - ZED-F9K module.Connect MOSI/CFG_COM0:14 to MISO/CFG_COM1:15.
NEO-6M-GPS
Controls
Properties
Availability & Pricing
No results found.
Assets
id=image-removebg-preview
id=3D_NEO-6M-GPS
id=FP_XCVR_NEO-6M-GPS
Simulation
Cpp
#include <SoftwareSerial.h> const int sosButtonPin = 0; int buttonState = 0; SoftwareSerial A9G(12, 13); // RX, TX void setup() { Serial.begin(115200); A9G.begin(9600); pinMode(sosButtonPin, INPUT_PULLUP); // Set up GSM module A9G.println("AT"); delay(100); A9G.println("AT+CGNSPWR=1"); // Turn on GPS delay(100); } void loop() { buttonState = digitalRead(sosButtonPin); if (buttonState == LOW) { sendSOS(); delay(1000); } } void sendSOS() { // Read GPS data A9G.println("AT+CGNSINF"); delay(1000); // Assume GPS data is returned in a specific format and parse it String gpsData = ""; while (A9G.available()) { gpsData += char(A9G.read()); } // Extract the GPS coordinates from the gpsData string // This is just an example; actual code will depend on the returned format String latitude = "0.0"; String longitude = "0.0"; // Send SMS with coordinates A9G.println("AT+CMGF=1"); // Set SMS to text mode delay(1000); A9G.println("AT+CMGS=\"+1234567890\""); // Replace with the emergency number delay(1000); A9G.println("SOS! My location is: https://maps.google.com/?q=" + latitude + "," + longitude); // Replace with Google Maps link delay(100); A9G.write(26); // ASCII code for CTRL+Z to send the SMS delay(1000); }
Designator | Ruleset | |
---|---|---|
*`VALUE`* | Override rule for *`VALUE`* | |
*`REF`* | Override rule for *`REF`* |
Welcome 👋
Flux helps you build PCBs faster with an AI teammate!
To use this component and get started with Flux sign up now.
meryam-badour
copilot