Problem with Thixtra library and SoftwareSerial

Hi,

I trying to use softwareSerial with the thinxtra xkit board.

I get an error when I only have the following code

#include <Tsensors.h>
#include <SoftwareSerial.h>

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

I had all my code written but was failing. I thought to complie the basic code above and this also fails with the same error
here is the error which I get
C:\Users\SIDDHA~1\AppData\Local\Temp\arduino_build_407723\libraries\SoftwareSerial\SoftwareSerial.cpp.o (symbol from plugin): In function SoftwareSerial::read()':** **(.text+0x0): multiple definition of __vector_4’
C:\Users\SIDDHA~1\AppData\Local\Temp\arduino_build_407723\libraries\Tsensors\Tsensors.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status

Kindly help me resolve the issue

Siddharth

(.text+0x0): multiple definition of `__vector_4'

you have two libraries needing the same resource (likely Pin Change Interrupt)

Hi,

Thanks for the reply and that seems to be the reason.

I cannot do away with Tsensor.h

Can you please suggest me a solution for the same.

I have tried NeoSWSerial but that also posses the same problem.

Kindly help

The easy way is to use a more capable Arduino... one with multiple hardware Serials or if you don't need Serial port after uploading then use the pin 0 and 1 for Serial exchange (of course means you can't use that for debug)

True.

But are there no solution to the above problem apart from going with a new hardware

Well there might be way - but if you have racing conditions triggering interrupts and need to maintain critical timing on Serial then you are looking for trouble with a Software Serial implementation

If the UNO is mandatory and you don’t use the only Serial port besides debug, then use that one…

Actually, The HardwareSerial on the UNO is talking to the Thinxtra board

So i have to use the hardware serial and cannot use it for anything else

and only the ANALOG PINS are VACANT for me to put any other devices. so thought of using software serial

But its conflicting with the THNXTRA library

siddharthtaunk: Actually, The HardwareSerial on the UNO is talking to the Thinxtra board

ah OK - I'm not familiar with that board

In the library they do this

unsigned long lasttimeButton = 0;
ISR(PCINT1_vect) {    // Interrupt service routine. Every single PCINT8..14 (=ADC0..5) change
            // will generate an interrupt: but this will always be the same interrupt routine
    unsigned long currenttime = millis();
    unsigned long interval = (unsigned long)(currenttime - lasttimeButton);
    if ( (digitalRead(buttonPin)==0) & (interval > 200) ) {
        ButtonService();
    }
    lasttimeButton = currenttime;
}

if you don't use the button or whatever is on Analog Pins with their board, then you could try to comment out this ISR from their library...

Hi,

Thanks This worked.

I commented out the ISR andeverything works as expected.

Thanks aagain

great :)