Hey Guys
I am currently working on a project where i would like to read some data via the Serial Port (Pin 17 RX) on my Arduino Due.
The data has 8bit parity is even and 2 stop bits.
The data is coming from a RC-Contrler via an SBUS intface (every thing works and was measuret in the analoge domain).
If i try to configure the Serial2 via:
IN: [SBUS_exampleMy]
SBUS Sbus(Serial2); (constructor)
IN: [sbus.h]
class SBUS{
public:
SBUS(HardwareSerial& bus);
IN: [sbus.cpp]
SBUS::SBUS(HardwareSerial& bus)
{
_bus = &bus;
}
_bus->begin(_sbusBaud,SERIAL_8E2);
I just get:
Arduino: 1.8.12 (Windows 10), Board: "Arduino Due (Programming Port)"
F:\Documents\Arduino\libraries\Bolder_Flight_Systems_SBUS\src\SBUS.cpp: In member function 'void SBUS::begin()':
F:\Documents\Arduino\libraries\Bolder_Flight_Systems_SBUS\src\SBUS.cpp:60:35: error: no matching function for call to 'HardwareSerial::begin(const uint32_t&, UARTClass::UARTModes)'
_bus->begin(_sbusBaud,SERIAL_8M1);
^
F:\Documents\Arduino\libraries\Bolder_Flight_Systems_SBUS\src\SBUS.cpp:60:35: note: candidate is:
In file included from C:\Users____\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\cores\arduino/Arduino.h:195:0,
from F:\Documents\Arduino\libraries\Bolder_Flight_Systems_SBUS\src\SBUS.h:27,
from F:\Documents\Arduino\libraries\Bolder_Flight_Systems_SBUS\src\SBUS.cpp:24:
C:\Users___\AppData\Local\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);
^
C:\Users___\AppData\Local\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 (Programming Port).
By searching in the web i found some old posts where the conclusion was that config is not yet implemented is that true? And is there a workaround for it?
I realy need help i dont know what to do anymore....
Thank you very much for any feedback
HardwareSerial.h (1.31 KB)
SBUS.h (3.22 KB)
SBUS.cpp (11.9 KB)
SBUS_exampleMy.ino (2.43 KB)