Go Down

Topic: Problem with Arduino Esplora pins (Read 1 time) previous topic - next topic

nicolopadovandev

Code: [Select]
Arduino:1.8.8 (Mac OS X), Scheda:"Arduino Esplora"

libraries/Servo/avr/Servo.cpp.o (symbol from plugin): In function `ServoCount':
(.text+0x0): multiple definition of `__vector_17'
sketch/zootropio.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here
lto1: internal compiler error: compressed stream: data error
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: fatal error: /private/var/folders/3g/w8g7cdxd1pn8fcd3r8c9hv600000gn/T/AppTranslocation/E5A8D40F-E174-4889-80CF-9855BAA98A48/d/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-gcc returned 1 exit status
compilation terminated.
/private/var/folders/3g/w8g7cdxd1pn8fcd3r8c9hv600000gn/T/AppTranslocation/E5A8D40F-E174-4889-80CF-9855BAA98A48/d/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
exit status 1
Error during the compilation of the board Esplora
libraries/Servo/avr/Servo.cpp.o (symbol from plugin): In function `ServoCount':
(.text+0x0): multiple definition of `__vector_17'
sketch/zootropio.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
exit status 1
Error during the compilation of the board Esplora (this last line was in italian and I had to translate it)
I'm just trying to send a rocket controlled by arduino to the space and back. Hi Elon Musk.

nicolopadovandev

I think that the PalatisSoft.h and Servo.h both use __vector17... I don't know what to do D:
I'm just trying to send a rocket controlled by arduino to the space and back. Hi Elon Musk.

pert

Yes, you're right. This is an issue you'll encounter sometimes. Some libraries conflict with each other because they use the same timer. That is the case here.

There are some alternate servo libraries used to work around this issue. I know people sometimes recommend ServoTimer2 but unfortunately it is not compatible with the Esplora. I'd do some searching with the terms: arduino servo "multiple definition" and you'll probably find a solution.

nicolopadovandev

#33
Jan 11, 2019, 08:26 pm Last Edit: Jan 11, 2019, 08:28 pm by nicolopadovandev
Could'nt find anything so I asked on the GitHub of the platinisSoftPWM library in the sections "issues" specifying that I'm using the Esplora which isn't allowed to use the ServoTimer2... I'll wait. Can I contact you for any further problem? And also, and sorry if I insist, can you help me on my other discussion? https://forum.arduino.cc/index.php?topic=589841.msg4011831#msg4011831
I'm just trying to send a rocket controlled by arduino to the space and back. Hi Elon Musk.

pert

nicolopadovandev's issue report:
https://github.com/Palatis/arduino-softpwm/issues/15
That is actually the arduino-softpwm library's repository. arduino-softpwm is the library I created my PalatisSoftPWM library fork from. It's not appropriate to submit support requests for the PalatisSoftPWM library to the arduino-softpwm repository. arduino-softpwm does have the same incompatibility with Servo. In fact, someone has already submitted an issue report about this:
https://github.com/Palatis/arduino-softpwm/issues/12

nicolopadovandev

#35
Jan 12, 2019, 01:03 pm Last Edit: Jan 12, 2019, 01:07 pm by nicolopadovandev
Yep but it doesn't have any reply, and he doesn't use esplora (which is not allowed to use ServoTimer2)... I didn't get what do I have to do to make servos and pwm work together
I'm just trying to send a rocket controlled by arduino to the space and back. Hi Elon Musk.

nicolopadovandev

Pert, which is the analog pin in the tinker kit of the esplora? So I will take away the library (I'm gonna use it in other projects) for using the servo
I'm just trying to send a rocket controlled by arduino to the space and back. Hi Elon Musk.

pert

The analog pin is marked "A9" in green.

nicolopadovandev

It's already used... I'm so stressed for this little project and you are being my God lmao.
The problem is:
- I need 2 analog pins and the only one is already used
- The solution is that I can use palatisSoftPWM.h library, but I also need the Servo.h library and they cause a conflict.
- I couldn't find anything on the internet...

Can you help me? I know that I'm being so insistent and everything and I'm really sorry but you are so smart and clear with your explanations, and you always answer very quickly... sorry sorry and thanks
I'm just trying to send a rocket controlled by arduino to the space and back. Hi Elon Musk.

pert

How many PWM pins do you need? I know you said 3 at one point but then I seem to remember it turned out you didn't need that many.

nicolopadovandev

I need 1 for the Servo and 1 for the motor speed
I'm just trying to send a rocket controlled by arduino to the space and back. Hi Elon Musk.

pert

- I need 2 analog pins and the only one is already used
- The solution is that I can use palatisSoftPWM.h library, but I also need the Servo.h library and they cause a conflict.
- I couldn't find an
Aargh. So by "analog pin", you are actually talking about a hardware PWM pin, right? We don't call those pins "analog pins". Analog pins are the analog input pins you can use with analogRead. Those have no relation to the pins you can use with analogWrite. The pin marked "A9" is an analog input pin.

I need 1 for the Servo and 1 for the motor speed
You don't need a PWM pin for the servo. So you only need one PWM pin. Keep in mind you have the option of using the hardware PWM pin on one of the TinkerKit connectors instead of PalatisSoftPWM. That will allow you to use the standard Servo library with no conflict.


nicolopadovandev

There are 2 pwm pins in the tinker kit right?
The pwm is needed for the servo and the motor or only for the motor? And if the servo doesn't need it, how can I use it?
I'm just trying to send a rocket controlled by arduino to the space and back. Hi Elon Musk.

pert

There are 2 pwm pins in the tinker kit right?
Yes. One on each of the orange TinkerKit connectors on the top right side of the Esplora. We've already been over this.

There are 2 pwm pins in the tinker kit right?
The pwm is needed for the servo and the motor or only for the motor?
Only the motor.

And if the servo doesn't need it, how can I use it?
Read the documentation:
https://www.arduino.cc/en/Reference/Servo

nicolopadovandev

Love ya, but I need to wait for the wires that you send me the image of, because I can't connect the tinker kit right now lol
I remember you my other discussion:
https://forum.arduino.cc/index.php?topic=589841.0
<3
I'm just trying to send a rocket controlled by arduino to the space and back. Hi Elon Musk.

Go Up