🕵️ SicherheitslückenHak5: Hackers Just Poisoned the Rust Supply Chain | Threat Wire(01.09.2026 um 14:00 Uhr)
🕵️ SicherheitslückenHak5: Hackers Found a Way Into Humanoid Robots | Threat Wire(04.09.2026 um 15:04 Uhr)
🔧 AI Nachrichten Bits und so #1021 (Passwort für Laufwerk)(31.08.2026 um 22:15 Uhr)
🔧 AI Nachrichten Bits und so #1022 (Wie Weißbier)(06.09.2026 um 20:39 Uhr)
🍏 iOS / Mac OSHue-App 6.0 ist da: das sind die Neuerungen(07.09.2026 um 17:21 Uhr)
🕵️ SicherheitslückenHak5: Hackers Just Poisoned the Rust Supply Chain | Threat Wire(01.09.2026 um 14:00 Uhr)
🕵️ SicherheitslückenHak5: Hackers Found a Way Into Humanoid Robots | Threat Wire(04.09.2026 um 15:04 Uhr)
🔧 AI Nachrichten Bits und so #1021 (Passwort für Laufwerk)(31.08.2026 um 22:15 Uhr)
🔧 AI Nachrichten Bits und so #1022 (Wie Weißbier)(06.09.2026 um 20:39 Uhr)
🍏 iOS / Mac OSHue-App 6.0 ist da: das sind die Neuerungen(07.09.2026 um 17:21 Uhr)

🔧 Programmierung 🕛 kürzlich 8 Min Lesezeit
0

Self-Aligning Dish in Rust: Command

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

Our project is designed to receive commands remotely via Bluetooth. To facilitate this transfer, the UART peripheral in the Pico will have to be set up. The UART is a protocol that controls serial communication between supported devices. 



The Pico has two independent UARTs. We'll use UART1 for this task.






Table of Contents




  • Flowchart

  • Requirements


  • Implementation


    • Serial Bluetooth App

    • Connections

    • UART Configuration

    • Test

    • Interrupt






  • Final Code









Flowchart











Implementation



Remote commands will be sent from a Serial Bluetooth Terminal App on a phone and will be a byte each. They are shown below.




































Command Execution
A Toggle the system between Manual and Auto modes
B Move the PTZ kit Clockwise
C Move the PTZ kit Counter-clockwise
D Move the PTZ kit Up
E Move the PTZ kit Down
F Move the PTZ kit to Position Zero


We will organize the above options into a Direction enum.




CODE
enum Direction {
Cw,
Ccw,
Up,
Down,
Zero,
}





Create a global static variable DIRECTION that will hold the position of the system at any given time.



CODE
static DIRECTION: Mutex<RefCell<Option<Direction>>> = Mutex::new(RefCell::new(None));





The Serial Bluetooth App is linked to the HC-05 module which is in turn physically connected to gp8 and gp9 pins in the Pico. A complete path is therefore created from the phone issuing the command to the RP2040 processing it.







Serial Bluetooth App



As mentioned earlier we will be using the Serial Bluetooth App to send our commands to our system remotely.



We first have to set up the app so that it sends precisely one byte per press. Navigate to settings and under Newline select None. This is to enable the transmission of the command byte only and therefore match the UART interrupt, which we'll also set up to receive only one byte at a time. 



We will also allow local echo to help us visualize the commands we are sending.





Also edit the macro rows to have the commands discussed above i.e. Auto/Manual, CW, CCW, UP, DOWN and Zero.



You should have something of this sort:





The electrical connections will be as shown above.







UART Configuration



To begin we must configure the pins on the Pico board associated with UART1. These shall provide the physical connection to the HC-05 module in our program.





Now that we have confirmed UART is working, we can proceed with writing the interrupt service routine that'll receive the command bytes.








Interrupt



The algorithm below gives the general flow of the UART interrupt service routine.



final copy.



Here are highlights of the changes made from the previous program.



Running this program will flash it into the Pico and we'll be set to receive commands remotely via Bluetooth.



In the next part of the series we shall finish up on command reception by implementing the application section of the program.

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
Hackers Just Poisoned the Rust Supply Chain | Threat Wire
1 Quelle
Hackers Found a Way Into Humanoid Robots | Threat Wire
1 Quelle
Bits und so #1021 (Passwort für Laufwerk)
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Self-Aligning Dish in Rust: Command

Thematisch verwandte Begriffe: SelfAligning, Dish, Rust, Command · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...