Pwm on all maestro channels

I have a few parallax ultrasonic pingers that I want to use from my maestro. It uses PWM to start the ping and receive the distance response. Sending a pulse at least 10 micro seconds long causes the ping and the response coming back is a pulse that represents the distance. How can I send a single pulse at least 10 micro seconds or longer on any channel defined as servo?

Does SET TARGET repeat the target pwm? If so, how often is it repeated? If so, will creating a script that does a set target 40 immediately followed by a set tartget 0 cause a single pulse cause a single 10 microsecond pulse? Or would I need to put a delay between the commands for 10 micro seconds? I realize that I would need to set the servo min to 40.

As for the response PWM, I’m hoping it is retained from the last PWM sent. Parallax sends a single PWM in response to the single PWM request. I should then be able to read my pinger’s distance value using get position.

Am I thinking correctly? Or is there a better alternative than using some other PWM card that can do this?

Thanks, Jon.

Hello.

The Maestro cannot read hobby RC signals, so I do not think what you are trying to do with it is feasible. I recommend getting a general-purpose programmable microcontroller, which is more appropriate for controlling those PING))) sensors. If you get an Arduino-based microcontroller, or something like our A-Stars, which come pre-loaded with the Arduino bootloader, you could use the NewPing library which is written to handle the signaling for those sensors.

-Jon

Is there any way to get a single pulse width from the maestro? I want to use sensors that return a pulse width. I know I could use voltage on most but I prefer pulse width. Servo channels won’t work because they won’t send 0 or just 1 pulse. Using the SERVO setting of 0 disables the channel so I can’t get to the previous pulse width.

Maestro would have been best because I have servo’s and sensors that are near each other and the Maestro is much smaller than the UNO with a large USB connect. If maestro can’t return a pulse width, are there any alternatives that support this that will drive servo’s (or in worst case allows pulse width?

Thanks, Jon.

I am not sure if you noticed my response before you posted again, but I merged your posts since they are about the same thing. If the UNO will not work for you because of its size, I recommend using something like our A-Star Micro or one of our A-Star Minis, which are smaller and come preloaded with the Arduino-compatible bootloader. (This basically means you can program them with the Arduino IDE like you would do for the Arduino UNO.)

-Jon

Sorry Jon, I did not see your response before I responded. I was doing research while writing my post.

I was hoping that at least the single PWM channel on the Maestro would be capable of reading the pulse width. It’s strange that it does PWM but not PW functionality at all. I don’t want 2 cards for each segment in my project so it looks like I will need to write code to handle the servo’s instead of using a Maestro. It’s not difficult to write but it’s just 1 more thing for others to understand when they work on my project.

Thanks, Jon.