1

I am working on VTOL aircraft and currently I am looking for some good board as flight controller (FC). I could made it by myself, but it requests lot of time. I was thinking about one of fpv drone FC (I have avaiable this one:

https://www.banggood.com/cs/Original-Airbot-Omnibus-F4-Pro-V3-Flight-controller-SD-5V-3A-BEC-OSD-Current-Sensor-LC-Filter-p-1319177.html?gmcCountry=CZ&currency=CZK&createTmp=1&utm_source=googleshopping&utm_medium=cpc_bgs&utm_content=lijing&utm_campaign=ssc-cz-cs-all-newcustom-ncv80-1118&gclid=CjwKCAjwqJ_1BRBZEiwAv73uwEgBJQ1B3dcKvZJZy2lR5-wN-XC150Ybn0kZObpUQbgkbvKiN_fY5BoCCVEQAvD_BwE&cur_warehouse=CN

This board has very small dimensions and it has already everything I need. The problem is that it is made for softwares like betaflight etc. It uses STM32 F405 so I tried to add STM 32 support for arduino (https://github.com/stm32duino/Arduino_Core_STM32) and upload arduino code in it.

I had to install stm32 cube programmer and because this board is not one of arduino boards I have to build the code for different board with same processor (FEATHER_F405). Because of it I have to change board pinout in this file (C:\Users\\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\variants\FEATHER_F405). I checked if are those pins correct (in code I command to those pins to be High and then Low while I was measuring them with multimeter). So all the pins are correct. I was able to blik the onboard LED and beep the buzzer. The only problem I have is serial communication. I tried to send some Strings to computer via serial port, but I didnt received any data. Here is sample code that I used:

#include <SoftwareSerial.h>

#define LED 4 //PB_5   //Inverted (High => LED ON)
#define BUZZ 3 //PB_4

#define _RX1 D0 //PA_10
#define _TX1 D1 //PA_9

//#define D_P 35 //PA_11  
//#define D_M 36 //PA_12

//SoftwareSerial mySerial(_RX1, _TX1); // RX, TX
HardwareSerial  hwSerial_1(_RX1, _TX1);   // RX, TX

void setup() {

  hwSerial_1.begin(9600);   
 //mySerial.begin(9600);


  pinMode(LED,OUTPUT);
  pinMode(BUZZ,OUTPUT);

  //pinMode(_RX1,OUTPUT);
  //pinMode(_TX1,OUTPUT);

  //pinMode(D_P,OUTPUT);
  //pinMode(D_M,OUTPUT);
}


void loop() {

  digitalWrite(LED, HIGH);
  /*
  digitalWrite(_RX1, HIGH);
  digitalWrite(_TX1, HIGH);
  digitalWrite(D_P, HIGH);
  digitalWrite(D_M, HIGH);*/

  delay(1000);

  digitalWrite(LED, LOW);
  /*
  digitalWrite(_RX1, LOW);
  digitalWrite(_TX1, LOW);
  digitalWrite(D_P, LOW);
  digitalWrite(D_M, LOW);*/

  delay(1000);

  digitalWrite(BUZZ, HIGH);
  delay(100);
  digitalWrite(BUZZ, LOW);
  delay(1000);

  hwSerial_1.println("HelloWorld");
  //mySerial.println("HelloWorld");

}

I tried to run serial communication via USB and via UART1 (I used USB/ TTL conventer -> FT232), but non of these works. I also tried to use software serial and hardware serial library, but it didnt helped.

Do you have any advices how to make serial communication work?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.