Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change pin motor in multiwii 2.4 #39

Open
insonnecensore opened this issue May 2, 2024 · 2 comments
Open

Change pin motor in multiwii 2.4 #39

insonnecensore opened this issue May 2, 2024 · 2 comments

Comments

@insonnecensore
Copy link

Good morning.
I need to change motor pin in multiwii 2.4.
I use Arduino Nano and NRF24L01 so I need pin 11 for MOSI.
Please help me to change pin number 11 into pint number 5 or 6.
Thanks.

@zioCristia
Copy link

zioCristia commented May 5, 2024

The motor pin order configuration is defined in the Output.cpp file.
For the Arduino Nano in particular is at line 20, you'll have to modify those lines accordingly.

For example:

#if defined(PROMINI)
  uint8_t PWM_PIN[8] = {9,10,5,3,6,5,A2,12};   //for a quad+: rear,right,left,front
#endif

Then of course, since the pin 5 is the pitch pin you'll have to modify the def.h file to change it (line 331 for Arduino Nano) with an unused one.

For example if you don't use the led pin:

#define PITCHPIN                   13

@insonnecensore
Copy link
Author

Thanks @zioCristia (I'm italian too).
Is it really so simple?
I'm going to use
#define PITCHPIN 8
because pin 8 is unused, and
#if defined(PROMINI)
uint8_t PWM_PIN[8] = {9,10,5,3,6,5,A2,12}; //for a quad+: rear,right,left,front
#endif
That's all?
Nothing else for my tricopter?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants