DShot implementation for Arduino using bit-banging method
Refer to the post in Stackexchange
DShot implementation for Arduino using bit-banging method
DShot implementation for Arduino using bit-banging method
Refer to the post in Stackexchange
The library is not compiling on ATMega4809, would it be possible to add support for it?
Hi,
Thanks a lot for implementing this! I am trying to test the code with a bluejay ESC. I am able to make the ESC work using betaflight, but when I try with this implementation I cannot make it work. Do you have any hints?
Thank you again!
Hi, I'm trying to control one ESC on my Teensy 4.1. I changed ESCPID_NB_ESC to 1 and my HOST_DEV_SERIALNB to the SNB of my Teensy. Unfortunately I can't get the ESC to boot. The Error code in the Linux Terminal is sometimes -10, sometimes -9. I don't know what that means. Can somebody explain?
You test throttle for beeing command after bit shifting, effectively multiplying it by 2.
static inline uint16_t createPacket(uint16_t throttle) {
uint8_t csum = 0;
throttle <<= 1;
// Indicate as command if less than 48
if (throttle < 48 && throttle > 0)
throttle |= 1;
uint16_t csum_data = throttle;
...}
You should have tested for 48*2.
if (throttle < 48*2 && throttle > 0)
Or am I wrong?
Thanks a lot for implementing this library!
I was wondering if it is also capable of activating the motor beacon?
Hi,
Using your library, I managed to control a DSHOT ESC with an Arduino Uno. Now, I want to use a Teensy 4.1 for that. I've written a library that uses DMA and FLEXPWM timers to achieve that, though these details shouldn't matter here. The way it works is:
Now, this would lead to the program spamming these 16 bits repeatedly, leading to no pauses between each group of 16 bits. To address this issue, I made the group of bits longer and padded it with zeros that should introduce a pause between the frames. For example, if I would choose to add 2 bits, I would have a group of bits of length 18 with the first 16 bits being the DSHOT bits and the last two bits being padded zeros. This however doesn't seem to be enough for the ESC to reliably detect the DSHOT protocol. Knowing that it worked on an Arduino Uno with the code of your library, I want to model the pauses exactly as long as you did. I suspect the pause between DSHOT frames here is introduced through the interrupt timer that sends out the DSHOT 16 bits. However, not being very familiar with that topic, I am struggling to understand how long that pause is for your library. Could you help me out?
Can there be more physical description on what to do? which pins should connect to DShot and which pins are used to change value of throttle? Bearing in mind PORT and PIN might have different meaning in terms of the Arduino. thank you
I've asked this question on Stack Overflow, but it has been deleted and I doubt if it will survive the next attempt
https://arduino.stackexchange.com/questions/43851/dshot-implementation-on-arduino-esc-protocol
so asking also here:
Is it possible to use/adapt the library for receiving DShot as well? The motivation is that some (all?) ESCs fall back to PWM if they get no DShot input. So there is a possibility that the flight controller generates PWM despite being programmed for DShot output, the ESCs read it, the drone flies but it's still PWM and not DShot... So the idea is to test using Arduino if there is actually DShot emitted.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.