Error:
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
Arduino: 1.0.6 (Windows 7), Board: "Arduino Uno"
ll.cpp.o: In function __static_initialization_and_destruction_0': /ll.h:6: multiple definition of mySerial'
ini.cpp.o:/ll.h:6: first defined here
prova.cpp.o: In function loop': C:\Program Files (x86)\Arduino/prova.ino:12: multiple definition of mySerial'
ini.cpp.o:/ll.h:6: first defined here
I can not get out of this situation, I have to call "myserial" from various parts.
Tanks
See if something like this works for you. I have put the class in the same file as the program for convenience; you should be able to move it into the library files.
The instance of SoftwareSerial is passed to the constructor as a reference.
You had not shown the definition of rxd and txd, so I have assumed they should work like read and write methods on serial - rxd returns one byte or -1 if none available, txd sends one byte. You may want to add an available method.