Now with telemetry!
View Demo
.
Report Bug
.
Request Feature
- About the Project
- Built With
- Getting Started
- Usage
- Roadmap
- Contributing
- License
- Authors
- Acknowledgements
Bidirectional DShot (DShot + telemetry on the same single wire) is tricky to implement without tying up valuable DMA channels or SPI interfaces. Thankfully, it is possible to offload most of that work onto the PIO state machines on the rp2040.
This library contains a variety of helper classes and PIO programs in a helpful bundle, delivered in the following formats:
Format | Status |
---|---|
PlatformIO Project | Working |
PlatformIO Library | In progress |
Arduino Library | Todo |
Speed | Normal | Bidirectional | Notes |
---|---|---|---|
150kBit | ✅ | ❌ | not supported |
300kBit | ✅ | ✅ | |
600kBit | ✅ | ✅ | |
1200kBit | ✅ | ❌ | todo! |
PlatformIO (TODO: Arduino IDE as well)
- Clone this repo
- Open the folder in VSCode with the PlatformIO plugin extension installed
- Wait for PlatformIO to install the core
- Select one of the two environments (pi pico, or seediuno xiao 2040) or modify one to select a different rp2040 board.
- Connect a DShot ESC to GPIO 6 (GP6 on the pi pico, D4 on the seeduino xiao). The ESC must be powered, have its ground tied to the rp2040 board and have a motor connected (please be careful!). Do not connect the motor's power to the rp2040 board or you will cook it, and possibly whatever computer it's connected to.
- Press PlatfomIO: Upload. The board should flash, and the ESC should play 3 rising tones indicating that it's ready, followed by two rising tones indicating that it's armed
The example program does the following:
- 3 seconds of DShot command 0 (stop). The ESC requires some amount of DShot command 0 (around 300ms) to arm.
- 1 second of DShot command 13to enable extended telemetry (The ESC requires at least 6 consecutive commands to set this). This will do nothing if the ESC firmware doesn't support extended telemetry (BLHeli32 version 32.10 and newer support this).
- DShot throttle 25% (note: if your ESC is configured for 3d mode this will be -50% throttle instead, use the setThrottle3D method instead of setThrottle to avoid this).
If the DShot::ESC instance is configured for DShot::Type::Bidir, telemetry data will be output on the usb serial terminal if it's being read successfully.
TODO!
See docs: Also TODO! :/
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- If you have suggestions for adding or removing projects, feel free to open an issue to discuss it, or directly create a pull request after you edit the README.md file with necessary changes.
- Please make sure you check your spelling and grammar.
- Create individual PR for each suggestion.
- Please also read through the Code Of Conduct before posting your first idea as well.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
- Joseph Duchesne - Robot enthusiast - Joseph Duchesne - Added bidirectional support, refactored into library
- Connor Douthat - OG DShot+PIO hacker - Connor Douthat - DShot300 original implementation, DShot encoding functions
- pico-dshot by Connor Douthat - formed the basis of this project
- DShot - The missing handbook A vital guide to a murky specification.
- arduino-pico, and specifically Earle F. Philhower, III fork, which added PlatformIO support and many other enhancements
- ShaanCoding - Readme generator