Hi all. I have a simple program that starts 2 ultrasonic sensors that are to control 1 servo each.Then, inside a While loop I Get both sensors and finally either Print to Screen or Setservo. It compiles OK but does not run correctly, however if I comment either one of the sensors it works ok either printing or controlling the servo.
In the process of debugging I discovered that one of the problems seems to be that if you “Start” two sensors, the second one disables the first. Does this mean (please NOT!) that the controller can only control one USensor at a time? I have tried changing ports, inserting Waits etc to no avail. Please help. My project needs a few more US sensors in tandem to work.
Thanks for any guidance on this.
Hi Ricky, excellent!, that solved the problem. It is not very intuitive…maybe it should be posted on the FAQ’s? I am sure most everyone who attempts this will be baffled. Of course in retrospect it is logical since the sensors have no way of knowing what feedback belongs to which.
Thanks again, my marionette is now happily dancing!