Hi Folks,
Recently I got Duemilanove and experimenting with servo and I2C SRF08 sonar. I just want to rotate the servo to certain angle depending on the distance measured by sonar. So there are basically two steps: a) read value from sonar and b) map the value and rotate the servo.
Each separate step (as a different sketches) works just fine. Rotating servo with Servo library works as expected. I am also able to read distance from sonar. However, if I am trying to merge two sketches (essentially merging sweep and srf08 examples) I stop getting response from sonar and sketch hangs up waiting for the data from i2c bus.
I've got a feeling that there is some kind of conflict between these libraries which prevents them from being used together. Another reason I can imagine is the interference between i2c and servo because they are using common +5v power source.
I would appreciate if someone can comment on this issue and share experience (if any) on how to marry Servo and Wire libraries.
Thank you,
Andrey.