Hello
Anyone know how I change the default serial port in the Tsunami wav board library?
As usual.... one Example and zip useful instructions (yes, I have read the Read-me)
Hello
Anyone know how I change the default serial port in the Tsunami wav board library?
As usual.... one Example and zip useful instructions (yes, I have read the Read-me)
Right... you have to edit the library
Great
If you don’t want to modify the library directly, you can change the serial port in your own sketch by passing the desired HardwareSerial
object to the Tsunami class instance:
Tsunami tsunami(&Serial1); // Use Serial1 instead of the default Serial
That library does not have a constructor that takes any arguments. The readme file specifically details how to modify the .h file to user different serial ports
#define __WT_USE_SERIAL1__
//#define __WT_USE_SERIAL2__
//#define __WT_USE_SERIAL3__
//#define __WT_USE_ALTSOFTSERIAL__
Yes. You have to directly edit the library which I hate.
If you are working on difference pieces of code with different connections, then you have to keep jumping back in and editing the setup files. It's a pain.
I wish these libraries had all the required options broken out so you could configure them from your code.
I am having real issues lately with badly setup or thought out libraries. I am grateful for them, but I wish they would document how they work better and just think outside the box a little.
Feel free to branch the code, change it and do a pull request. The power of open source!