I am fairly new to electronics and am trying to build a drone from scratch as a hobby project. I want a setup where I can control all the motors individually through the software. Through some research I found that ESCs are the way to go for BLDC motors, and I am planning on getting this one. I also came across this post which is almost identical to the thing that I am trying to do, except that I am using a Raspberry Pi. After multiple failed purchases due to not knowing what would work with my setup, I am reluctant to buy this and want to know how to connect it before the purchase.

This is the diagram of the ESC: diagram

My biggest worry is that the raspberry pi's diagram only has 2 PWM (pulse width modulation) pins (32, 33): raspberry pi pin diagram

How would I connect these 2 to have access to the speeds of all the motors individually?


1 Answer 1


I work with RaspPi a lot. I will keep it short, 2 big problems:

1- PI is slow AF! Way too slow to use for the drone feedback loop (runtime)

2- And where is the 5kloc+ of C lang code coming from? The software in use is very complex. We have not seen ANY new FC firmware in 10+ years (correct if wrong). BetaFlight is the same code base from BaseFlight (2010 era) that was forked from another project. KISS/FETTEC has been around for 10+ years as well. No one is writing new firmware, many have tried.

Fianlly, the LINGYUN ESC should be skipped. If you actually are going to dedicate all this time in a total scratch build, at least get good parts and things that you can replace in a month or year.

The difference between Arduino's is grand, but many are fast little units and serve as the base for all flight controllers. PI's don't have the dedicated C lang/asm potential you need. They will compile and run, but I don't think the perfomance will be any good.

  • $\begingroup$ I'm sorry I don't understand what you mean by 5kloc+ C lang code. Could you elaborate on that? $\endgroup$ Commented Jul 15, 2023 at 23:27
  • $\begingroup$ KLOC = thousand(s) of lines of code. I am commenting on the workload regarding the code - size of the code base and complexity. Most controllers are small ARM-like chips (no OS). You need C lang (C language ) or similar (C++, Rust, compiled/micro python) to get the IO speed to make micro-adjustments for flight. As for kloc, I don't know the exact count - but betaflight is huge. github.com/betaflight/betaflight/tree/master -- I know a few people who did use a Pi for flight, it was more like a "Pi was on board while another pcb did the actual flying: $\endgroup$
    – FunHog.me
    Commented Jul 17, 2023 at 18:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.