Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Python Samples

This directory includes Python samples for Turta RC Driver HAT.


  • Demonstrates reading analog inputs.
  • Demonstrates measuring battery Voltage.
  • Demonstrates using PWM outputs on controller port.
  • Demonstrates setting fan speed according to CPU temperature.
  • Demonstrates reading 3D gyro and acceleration data.
  • Demonstrates controlling LED lighting.
  • Demonstrates reading remote controller PWM channels from an RC receiver.
  • Demonstrates transferring RC remote inputs to steering servo and ESC.
  • Demonstrates reading vehicle speed using tachometer inputs.

Running the Python Samples

  • Copy the sample code to your Raspberry Pi.
  • Install the libraries with 'pip3 install turta-relayhat2' command.
  • Run the sample with 'python3 <Sample_Name>.py' command.
  • Exit from the sample using CTRL+C or ^C key.


Visit for documentation.

You can’t perform that action at this time.