Open RobinLeblond opened 2 years ago
Better documentation is a good idea 😊
You can use hardware serial like this:
SPortHub hub(0x12, Serial);
Wow, easy like that! Thanks
Unfortunately, this solution does not work due to several reasons:
1) The constructor of SPortHub with a Serial parameter is hidden in a strange conditional compilation statement:
#ifdef Serial_
SPortHub(int physicalId, Serial_& serial);
#elif HardwareSerial
SPortHub(int physicalId, HardwareSerial& serial);
#endif
I think, the different constructors shall be all visible and overloaded.
2) Because of the conversion operator
Serial_::operator bool()
in the class
Serial_
the constructor used for
SPortHub(0x12, Serial);
is again;
SPortHub(int physicalId, int softwarePin);
which makes no sense at all, but we get no error message here.
Hello, I didn't know how to ask this elsaway, but can you explain how to use it with the hardware serial instead of the sofware one ? All your example look like using the software serial, thanks.