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

Problem with data reception after iBus #26

Open
stryjekryjek opened this issue Jun 1, 2022 · 1 comment
Open

Problem with data reception after iBus #26

stryjekryjek opened this issue Jun 1, 2022 · 1 comment

Comments

@stryjekryjek
Copy link

stryjekryjek commented Jun 1, 2022

Hi friend,
I have such a problem, namely I want to receive data via iBus from the flysky ia6b receiver.
The problem is that I get all 0 instead of specific values.
The same code uploaded to ArduinoMega works without a problem and with stm32 it does not want.
I tried on the STM32F411 / F401 blackpill, NUCLEO-F401RE plates and all the time I have only zeros.

Ch0: 0 ---- Ch1: 0 ---- Ch2: 0 ---- Ch3: 0 ---- Ch4: 0 ---- Ch5: 0 ---- Ch6: 0 ---- Ch7: 0 ---- Ch8: 0 ---- Ch9: 0 ---- Ch10: 0 ---- Ch11: 0 ---- Ch12: 0 ---- Ch13: 0 ---- Next
Ch0: 0 ---- Ch1: 0 ---- Ch2: 0 ---- Ch3: 0 ---- Ch4: 0 ---- Ch5: 0 ---- Ch6: 0 ---- Ch7: 0 ---- Ch8: 0 ---- Ch9: 0 ---- Ch10: 0 ---- Ch11: 0 ---- Ch12: 0 ---- Ch13: 0 ---- Next
Ch0: 0 ---- Ch1: 0 ---- Ch2: 0 ---- Ch3: 0 ---- Ch4: 0 ---- Ch5: 0 ---- Ch6: 0 ---- Ch7: 0 ---- Ch8: 0 ---- Ch9: 0 ---- Ch10: 0 ---- Ch11: 0 ---- Ch12: 0 ---- Ch13: 0 ---- Next
Ch0: 0 ---- Ch1: 0 ---- Ch2: 0 ---- Ch3: 0 ---- Ch4: 0 ---- Ch5: 0 ---- Ch6: 0 ---- Ch7: 0 ---- Ch8: 0 ---- Ch9: 0 ---- Ch10: 0 ---- Ch11: 0 ---- Ch12: 0 ---- Ch13: 0 ---- Next
Ch0: 0 ---- Ch1: 0 ---- Ch2: 0 ---- Ch3: 0 ---- Ch4: 0 ---- Ch5: 0 ---- Ch6: 0 ---- Ch7: 0 ---- Ch8: 0 ---- Ch9: 0 ---- Ch10: 0 ---- Ch11: 0 ---- Ch12: 0 ---- Ch13: 0 ---- Next

Code:

#include <IBusBM.h>



IBusBM IBusServo;

//Arduino Mega
//HardwareSerial Serial2(17,16); 

//                      RX    TX
//HardwareSerial Serial2(PA3, PA2);
  
void setup() {
  Serial.begin(115200);

  IBusServo.begin(Serial2);

}

void loop() {
  ibusServo();

}
//
//
//

void ibusServo()
{
 // show first 14 servo channels
  for (int i=0; i<14 ; i++) {
    Serial.print("Ch");
    Serial.print(i);
    Serial.print(": ");
    Serial.print(IBusServo.readChannel(i));
    Serial.print(" ---- ");

  }
 Serial.println("Next");

  delay(1000);
}

Has anyone encountered such a problem ??
I tried to download only Stm32Cores on a clean installation and IbusBM also does not work ;(

https://cdn.discordapp.com/attachments/773515783241990144/981518868163993610/20220601_132505.jpg

The worst part is that exactly a year ago, maybe one and a half everything was working on the blackpill STM32F411.
And I did some dumb updates a while ago and it stopped working.
I installed clean windows10 for this arduino IDE earlier versions I only added STM32 and ibusBM. Unfortunately, no success.

@stryjekryjek
Copy link
Author

stryjekryjek commented Jun 16, 2022

Ok, I found a solution. The problem is the stm32duino ibus sensor works on the old version 1.9.0 on the newer one does not want to work in any way.
Is there a chance to solve this problem and where can I report it?
Is there a chance to adapt the library to the new version of stm32duino 2.2.0 ??
Thank you in advance for your help.

@bmellink This code work on version 1.9.0 but don't work on 2.0.0, 2.1.0, 2.2.0 (connect https://github.com/bmellink/IBusBM/raw/master/wiring.png?raw=true)

more: stm32duino/Arduino_Core_STM32#1741


#include <IBusBM.h>

IBusBM IBusSensor;

HardwareSerial Serial2(PA3, PA2); //RX, TX

  
void setup() {

 
  IBusSensor.begin(Serial2);
  IBusSensor.addSensor(IBUS_MEAS_TYPE_GPS_DIST);

IBusSensor.setSensorMeasurement(1, 200); 


}

void loop() 
{

}

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

1 participant