Code Monkey home page Code Monkey logo

dshot-arduino's People

Contributors

gueei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dshot-arduino's Issues

receiving DShot

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.

Assembling components

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

Question about timing

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:

  • determine the 16 DSHOT bits
  • Spam these bits out repeatedly according to the bitlength determined by the DSHOT protocol

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?

Motor Beacon

Thanks a lot for implementing this library!
I was wondering if it is also capable of activating the motor beacon?

Not working with Bluejay ESC

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!

How can I get it to work?

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?

Support for ATMega4809

The library is not compiling on ATMega4809, would it be possible to add support for it?

Seems like there is a problen with createPacket function.

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.