Notifications
Clear all

Two custom libraries conflict with each other - Any solution?

3 Posts
2 Users
0 Likes
3,295 Views
(@fubby2)
Member
Joined: 5 years ago
Posts: 2
Topic starter  

Hello folks. I am running an Arduino Uno with a PCA9685 16 Servo expander and an Adafruit "Music Maker" shield. I need to play audio and move up to 3 servos at the same time. When I moved the servos normally everything was fine, but I wanted to make the motion more lifelike, so I am using [Servo Easing]( https://www.arduinolibraries.info/libraries/servo-easing) to have the servos move according to a sine wave. The problem is that this seems to break the [Adafruit music shield library]( https://learn.adafruit.com/adafruit-music-maker-shield-vs1053-mp3-wav-wave-ogg-vorbis-player/library-reference). If I try to start audio then move a servo, the audio starts for a fraction of a second before the servo starts moving, and the audio stops. Basically the servo will always take precedent over the audio and the audio will stop as soon as a servo starts to move with easing.

I am not experienced in electronics, but upon reading I believe this likely has something to do with both libraries using the same "16 bit timer", or having the same pinouts. Anyone have any thoughts? Any help would be greatly appreciated!


   
Quote
triform
(@triform)
Member
Joined: 5 years ago
Posts: 324
 

It would be them using the same timer.  What type Arduino are you using? 


   
ReplyQuote
(@fubby2)
Member
Joined: 5 years ago
Posts: 2
Topic starter  

@triform

An Arduino Uno, Adafruit MusicMaker shield, and a PCA9685 16 servo extender.


   
ReplyQuote