🪟 Windows TippsModify Windows Support Phone Number with PowerShell(03.09.2026 um 00:00 Uhr)
🔧 AI Nachrichten Podcast: ChatGPT schwatzt Nutzern in Deutschland jetzt Werbung auf(28.08.2026 um 08:46 Uhr)
🪟 Windows TippsMicrosoft bringt Emoji 17.0 auf Windows 11(31.08.2026 um 08:16 Uhr)
🪟 Windows TippsModify Windows Support Phone Number with PowerShell(03.09.2026 um 00:00 Uhr)
🔧 AI Nachrichten Podcast: ChatGPT schwatzt Nutzern in Deutschland jetzt Werbung auf(28.08.2026 um 08:46 Uhr)
🪟 Windows TippsMicrosoft bringt Emoji 17.0 auf Windows 11(31.08.2026 um 08:16 Uhr)

🔧 Programmierung 🕛 vor 1 Jahr 6 Min Lesezeit
0

Self-Aligning Dish: GPS

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht

To receive GPS data, we'll use the Neo-6m GPS module. Like the HC-05 Bluetooth module from the previous part, it uses UART for communication. We'll use UART0 for this part of the project.






Table of Contents




  • Requirements

  • Flowchart


  • Implementation


    • UART Configuration

    • Connections

    • Test

    • Interrupt






  • Final Code









Requirements




  • 1 x Raspberry Pico board

  • 1 x USB Cable type 2.0

  • 9 x M-M jumper wires

  • 1 x HC-05 Bluetooth Module

  • 2 x Mini Breadboards

  • Serial Bluetooth App








Flowchart



in the 'Command' part of the series.




CODE
    // Configure gp0 as UART0 Tx Pin
// Connected to HC-05 Rx Pin
pads_bank0.gpio(0).modify(|_, w| w
.pue().set_bit()
.pde().set_bit()
.od().clear_bit()
.ie().set_bit()
);

io_bank0.gpio(0).gpio_ctrl().modify(|_, w| w.funcsel().uart());

// Configure gp1 as UART0 Rx Pin
// Will be connected to GPS Module Tx Pin
pads_bank0.gpio(1).modify(|_, w| w
.pue().set_bit()
.pde().set_bit()
.od().clear_bit()
.ie().set_bit()
);

io_bank0.gpio(1).gpio_ctrl().modify(|_, w| w.funcsel().uart());






Create a UART global variable and move uart into it.




CODE
static UARTDATA: Mutex<RefCell<Option<UART0>>> = Mutex::new(RefCell::new(None));






Import UART0




CODE
use rp2040_pac::UART0;






Move uart_data into its global variable.




CODE
cortex_m::interrupt::free(|cs| {
UARTDATA.borrow(cs).replace(Some(uart_data));
});











Connections



The electrical connections will be as shown below.










Interrupt



We first have to unmask the UART0 interrupt to enable it fully.




It is a good idea to have all the interrupts unmasked after we are through with all the peripherals set up. We can therefore move all the unmasking to the end of the set up.





CODE
    // Unmask interrupts
unsafe {
cortex_m::peripheral::NVIC::unmask(Interrupt::TIMER_IRQ_0);
cortex_m::peripheral::NVIC::unmask(interrupt::UART0_IRQ);
cortex_m::peripheral::NVIC::unmask(interrupt::UART1_IRQ);
}






We need a buffer that will hold the data from the GPS module. It is a variable shared between main and interrupts. We'll put it as a global variable.




CODE
static BUFFER: Mutex<RefCell<Option<String<164>>>> = Mutex::new(RefCell::new(None));// buffer to hold received gps data






In the main thread under buffers we'll initialize our buffer and move it into global scope.




CODE
let gpsbuf = String::new();// buffer to hold gps data

cortex_m::interrupt::free(|cs| {
BUFFER.borrow(cs).replace(Some(gpsbuf));
});






A naive approach we can use to acquire a GPS NMEA sentence is to accumulate bytes until we encounter an end-of-line byte. We can then process the received sentences into latitudes and longitudes. The flowchart below helps visualize this process.



final copy.



Running this program will flash it into the Pico and we'll be set to receive GPS data.



Next we shall test our program by continuously receiving and viewing the GPS data.

Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
1 Quelle
Modify Windows Support Phone Number with PowerShell
1 Quelle
Die Zukunft des Einkaufens: Warum wir ein neues Kapitel aufschlagen (und wie du es mitschreiben kannst)
1 Quelle
ZDE Podcast 251: Wie sieht digitales Instore Marketing 2026 aus, Amit Chatterjee?
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Self-Aligning Dish: GPS

Thematisch verwandte Begriffe: SelfAligning, Dish · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...