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

Support for Arduino Due #17

Open
itavero opened this issue Nov 2, 2020 · 8 comments
Open

Support for Arduino Due #17

itavero opened this issue Nov 2, 2020 · 8 comments

Comments

@itavero
Copy link

itavero commented Nov 2, 2020

Unfortunately the library currently doesn't support the Arduino Due.

WARNING: library IBusBM claims to run on avr, esp32, stm32, mbed architecture(s) and may be incompatible with your current board which runs on sam architecture(s).
/Users/arnom/Documents/Arduino/libraries/IBusBM/src/IBusBM.cpp: In member function 'void IBusBM::begin(HardwareSerial&, int8_t, int8_t, int8_t)':
/Users/arnom/Documents/Arduino/libraries/IBusBM/src/IBusBM.cpp:91:36: error: no matching function for call to 'HardwareSerial::begin(int, UARTClass::UARTModes)'
     serial.begin(115200, SERIAL_8N1);
                                    ^
/Users/arnom/Documents/Arduino/libraries/IBusBM/src/IBusBM.cpp:91:36: note: candidate is:
In file included from /Users/arnom/Library/Arduino15/packages/arduino/hardware/sam/1.6.12/cores/arduino/Arduino.h:195:0,
                 from /Users/arnom/Documents/Arduino/libraries/IBusBM/src/IBusBM.cpp:25:
/Users/arnom/Library/Arduino15/packages/arduino/hardware/sam/1.6.12/cores/arduino/HardwareSerial.h:29:18: note: virtual void HardwareSerial::begin(long unsigned int)
     virtual void begin(unsigned long);
                  ^
/Users/arnom/Library/Arduino15/packages/arduino/hardware/sam/1.6.12/cores/arduino/HardwareSerial.h:29:18: note:   candidate expects 1 argument, 2 provided
exit status 1
Error compiling for board Arduino Due (Native USB Port).

Seems like there's something wrong with the Arduino abstraction for the Due. 🤔

PS: I'm aware that later on I will probably need a level translator to deal with the 3V3 vs 5V signals.

@bmellink
Copy link
Owner

bmellink commented Nov 5, 2020

I did not have the time yet to look into supporting the Due and I do not have a device to test. If I make changes to the code, are you able to run tests?

@itavero
Copy link
Author

itavero commented Nov 5, 2020

I can perform some tests. If I find some time myself, I'll see if I can fix it and open up a PR.

@itavero
Copy link
Author

itavero commented Mar 29, 2021

Finally had some time to have a look.

I noticed that the serial port configuration (SERIAL_8N1) passed to Serial.begin is actually the default option (according to the Arduino website).
Just removing the parameter should fix it, I think.

I'll see if I have some time in the next week or so to verify this.

@bmellink
Copy link
Owner

You are right this should be an easy fix if this is the only change needed. Would love to hear if that is all that is required.

@itavero
Copy link
Author

itavero commented Apr 4, 2021

Just removing the argument at least makes it compile/run again.

Unfortunately it seems that I might be running into a hardware issue with the shield I've designed.
Used an TXS0108E IC to do the level translation between 5V (from the receiver) and the IOREF of the Arduino board.
Unfortunately I do see the UART signals with a scope on the 5V side, but I don't see them on the IOREF (3V3 in case of the Due) side.

In other words, I've not (yet) been able to verify that the data communication is actually working.

@MotoMotoRo
Copy link

Hello.
I use the blue pill STM32F103 and FlySky FS-iA6 + IA6b.
I tried the IBusBM-1.1.4 library, the examples with servo work, but those with sensor, telemetry can't solve. Can help be made?
Thanks.

@id3vi5er
Copy link

Hello.
I use the blue pill STM32F103 and FlySky FS-iA6 + IA6b.
I tried the IBusBM-1.1.4 library, the examples with servo work, but those with sensor, telemetry can't solve. Can help be made?

What do you mean by can't solve? It doesn't compile? Could you show a log?

@MotoMotoRo
Copy link

Thanks for the reply.
Sorry for the inaccuracy.
Compiles, but no sensor appears on the FS-i6 display.
Maybe I need to add or change something and I don't know.
Thank you again.

nh-99 added a commit to nh-99/IBusBM that referenced this issue Dec 28, 2022
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

4 participants