Skip to content

Attempts to control some of my RC things using Rust, Bevy and a PS4 controller

Notifications You must be signed in to change notification settings

initialed85/rc-things

Repository files navigation

rc-things

status: working but very coupled to my own personal projects

My latest attempts at remote control stuff.

Concept

Take a perfectly fine remote control device and over complicate it with things like ESP32s, STM32s and Raspberry Pis; use as much Rust as possible because I'm trying to learn it.

Approach

  • Run a client on a PC w/ a PS4 controller
  • It sends UDP messages to a vehicle
  • Vehicle converts the UDP messages into movement

Components

  • rc-messaging
    • Code for a universal messaging format that's worked for both my Ackerman steering and differential steering vehicles so far
    • Code for a minimal UDP server / client to send the above messages client (remote control) -> server (vehicle)
    • Uses serde and rmp-serde (MessagePack)
  • rc-vehicle
    • Code to compose the above together with a tiny bit of safety to avoid runaway vehicles

Implementations

  • rc-client
    • Code for a workstation with a UI that reads from a PS4 controller and sends messages to a vehicle
    • Uses Bevy for the I/O
  • esp32-rc-car
    • Code for an ESP32 microcontroller that runs a WiFi AP, receives UDP remote control messages and turns them into PWM signals
    • Based on esp-idf-template
    • Uses as much Rust standard library as possible
    • Uses rc-messaging and rc-vehicle
  • pi-rc-tank
    • Code for a Raspberry Pi that receives UDP remote control messages and turns them into serial remote control messages
    • Uses Rust standard library and Tokio
    • Uses rc-messaging and rc-vehicle
  • stm32-rc-tank
    • Code for an STM32 microcontroller that is packaged as a Husarion Core2, receives serial remote control messages and turns them into PWM signals
    • Uses hFramework C++ library (deprecated, but Core2 is coupled to it)

Vehicles

esp32-rc-car

Architecture

esp32-rc-car-architecture.png

Wiring

esp32-rc-car-wiring.png

pi-rc-tank and stm32-rc-tank

  • Husarion CORE2 (integrated STM32 and Raspberry Pi, seems to be Lego-compatible)
    • I already had this and used it as a Linux computer with WiFi (the Pi) and a microcontroller (the STM32)
      • So the responsibility of driving the tank is split between the two
  • Altronics 2WD robot base
    • I already had this and only used the 2 motors from it
  • Lego-compatible tracked robot
    • I already had this and used the tracks off it

Architecture

Wiring

About

Attempts to control some of my RC things using Rust, Bevy and a PS4 controller

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published