Changing Motor Order and Moving Pins Around with Betaflight Resource Remapping

Resource Remapping is an awesome feature in Betaflight, that allows you to swap some pins around on a flight controller. Using Resource Remapping there are so much you can do, for example, to change motor ordering, relocate pins in case of ripped-off solder pads, and many more!

How does Resource Remapping work in Betaflight

There are many pins on a processor (as shown in the top image), and each pin might be assigned a specific function. Resource Remapping basically tells the flight controller which ports we want the functions be assigned to.

This feature is available since Betaflight V3.1

In Betaflight configurator CLI, type “resource”, it will return the available functions that we can change, and their current pin assignment:

# resource
resource BEEPER 1 C15
resource MOTOR 1 B07
resource MOTOR 2 B06
resource MOTOR 3 B05
resource MOTOR 4 B04
resource PPM 1 B03
resource PWM 1 B00
resource PWM 2 B01
resource SONAR_TRIGGER 1 B00
resource SONAR_ECHO 1 B01
resource SERIAL_TX 1 A09
resource SERIAL_TX 2 A14
resource SERIAL_TX 3 B10
resource SERIAL_TX 11 B01
resource SERIAL_RX 1 A10
resource SERIAL_RX 2 A15
resource SERIAL_RX 3 B11
resource SERIAL_RX 11 B00
resource LED_STRIP 1 A08

The format is as follow:

resource [Function] [Index] [Port]

To change a pin for a function, you just follow the same format, and enter save at the end.

In the following we will show you some of the common usage of Betaflight Resource Mapping.

One very important note about this is, some of the pins of the processor might be unused, and does not connect to any solder points on the flight controller. The port you are changing the function to should ideally be a breakout pin on the flight controller (somewhere you can solder to easily). Otherwise you might have to solder a wire directly to the extremely tiny “leg” on the processor, which is really hard to do.

How to change LED Strip Pin?

For example if you want to change LED strip to A09, simply type in CLI:

resource LED_STRIP 1 A09

How to change motor ordering in flight controller (swap motor outputs)

As an example, imagine we had a quad with wrong motor ordering right now, because you mistakenly rotated the flight controller by 90 degree clockwise. Don’t worry, you don’t need to redo your soldering and wiring, you can easily fix this with Resource Remapping!

3     4
  \ /
  / \
1     2

The correct motor ordering should be like this as we should all know:

4     2
  \ /
  / \
3     1

Now type in “resource” in CLI, and please make a copy of the result (in case of any problem you can just go back). Then find the 4 lines specifying the motor pin assignment:

resource MOTOR 1 B07
resource MOTOR 2 B06
resource MOTOR 3 B05
resource MOTOR 4 B04

To manage the issue more easily, we can write down the current motor ordering with the pin number next to them:

3(B05)  4(B04)
     \ /
     / \
1(B07)  2(B06)

Now it becomes much clearer pin and motor you need to swap, right?

B06 should be “motor 1”, B04 should be “motor 2”, etc…

Type in CLI:

resource MOTOR 1 B06
resource MOTOR 2 B04
resource MOTOR 3 B07
resource MOTOR 4 B05

And that’s it!

How to change buzzer (beeper) pin

It’s just as simple as the examples above… BUT!

You cannot just assign any pin for the buzzer.

That’s because the buzzer can draw a fairly large amount of current (more than the STM32 processor can handle), therefore there is usually a transistor in place. The transistor handles the current for the processor, and it’s controlled by a signal from the processor. If you connect the beeper directly to the STM32 processor you could potentially fry it.

It’s probably not a good idea moving buzzer pin around considering how much work this is. But if you do decide to move the buzzer to another pin, you will need to build an external power circuit like this. This is an example for the CC3D FC’s, for the most reliable choice of component and circuit please consult your own FC manufacturer.

One thought on “Changing Motor Order and Moving Pins Around with Betaflight Resource Remapping

  1. bvonbla

    Nice! This resource mapping thing also comes in handy on some flight controllers where dshot is not supported on all motor outputs. (I still don’t fully understand why that is).

    For example, on the PicoBLX flight controller. One of the motor outputs does not support dshot. But when we remap that motor to the pin where PPM would be connected to (and solder the signal wire of that motor to the PPM pin) then dshot can be used on all 4 motors!


Leave a Reply

Your email address will not be published. Required fields are marked *

Are you Robot? *

I only check blog comments once or twice a week, if you want a quick reply you can post your question on this forum You might get a faster response from me there (multirotor related only).