-
Notifications
You must be signed in to change notification settings - Fork 0
Bidirectional dshot for Raspberry Pi 5 using RP1 and piolib
License
Marian-Vittek/raspberry-pi5-bidirectional-dshot
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This project allows to generate bidirectional DSHOT protocol to control ESCs via the GPIO pins of a Raspberry Pi 5. It uses 'piolib' and RP1 coprocessor to generate the signal and scan telemetry frames. It works well even if the main CPU is loaded by other tasks. It supports up to 28 motors. However, motors shall be connected to up to 4 continuous ranges of GPIO numbers. All versions of bidirectional DSHOT (300 / 600 / 1200) should work (1200 was not tested). The specific version has to be set into 'dshotVersion' variable prior to the initialization. Bidirectional DSHOT allows to control motors and read telemetry data from ESC on a single line. Telemetry includes rotation speed and optionally temperature, voltage and current. Note that the update rate of bidirectional DSHOT is much smaller than that of unidirectional DSHOT mainly due to line switching constraints. Some code used in this project comes from Joseph Duchesne's project: https://github.com/josephduchesne/pico-dshot-bidir You will need the newest version of Raspbian OS and the newest bootloader version (see the ‘Advanced Options’ of raspi-config) to run this code. To compile and run a simple test that spins 2 motors connected to GPIO 18 and 19, type: make test pinctrl set 18 op dl && pinctrl set 19 op dl && sleep 5 # possibly reset ESC sudo ./test 18 19 If it does not work for your ESC you may need to edit 'motor-bidshot.c' and adjust DSHOT_CLOCK_DIVIDER_FACTOR macro.
About
Bidirectional dshot for Raspberry Pi 5 using RP1 and piolib
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published