Micro Maestro servo controller RX terminal

My question #1, the RX line. Can I run the script below with a pulse of voltage to the RX terminal? I am going to start and activate the controller with a radio that puts out a 500ms pulse of 6-8 volts DC. I can replace the switch I am using to test with with a relay and take the pulse from my radio to switch a relay (mechanical device to fail sometime). Or can I put a voltage divider in between my radio and the RX line to use 500ms pulse of 3-4 volts to replace my switch and run the script through the RX line?

#2

7000 2 servo
350 delay
0 2 servo

In the code above

(7000 2 servo) is the command to give channel 2 pulses move servo 2 to position 1750?

(350 delay) is to send the pulses for 350 ms

(0 2 sevo) is to stop sending pulses to channel 2
Am I understanding this correctly?

Thanks
Bobby

# Uses WAIT_FOR_BUTTON_PRESS to allow a user to step through a sequence 
# of positions on servo 2,3,4,5 


begin
wait_for_button_press
7000 2 servo
350 delay
0 2 servo
wait_for_button_press
7000 3 servo
350 delay
0 3 servo
wait_for_button_press
7000 4 servo
350 delay
0 4 servo
wait_for_button_press
7000 5 servo
350 delay
0 5 servo
repeat




# Returns 1 if the button is pressed, 0 otherwise.   
sub button
1 get_position 500 less_than 
return 



# Waits for a button press, with debouncing.     
# (Requires the BUTTON subroutine.) 
sub wait_for_button_press 
wait_for_button_open_10ms 
wait_for_button_closed_10ms 
return 
# wait for the button to be NOT pressed for at least 10 ms    
sub wait_for_button_open_10ms 
get_ms # put the current time on the stack 
begin 
# reset the time on the stack if it is pressed 
button 
if 
drop get_ms 
else 
get_ms over minus 10 greater_than 
if drop return endif 
endif 
repeat 
# wait for the button to be pressed for at least 10 ms 
sub wait_for_button_closed_10ms 
get_ms 
begin 
# reset the time on the stack if it is pressed 
button 
if 
get_ms over minus 10 greater_than 
if drop return endif 
else 
drop get_ms 
endif 
repeat

Hello. The sample script that you posted can not detect pulses on the RX line. It could, however, detect pulses on one of your servo channels if you configure as an input. If you have a channel to spare, I would recommend using the channel to detect your pulses instead of the RX line.

The RX line is designed for detecting TTL serial bytes, not pulses. If the RX line is held low, you will get a constant series of Serial Signal errors and all the servos will go to their home positions if they have one. You could probably detect this condition using the get_position command in a script, but this would not be the ideal way to do things and might cause problems later.

None of the logic pins on the Maestro can tolerate voltages above 5 V. A voltage divider would work to reduce your signal’s voltage.

Your understanding of those three lines of script are correct.

–David

David the pullup resistor that I have connected now is putting a voltage less than 5 v on the input channel so if i put a voltage less than 5v on that channel with my radio it should look the same to the controller correct?

Could not have done this without you
Thanks
Bobby

The next questions will be about understanding button press portion of the script

I’m not sure what you’re asking… the Maestro simply measures the voltage on the input line. The Maestro does not have some special way to know how that voltage is being generated; it can’t tell whether it is from a radio or a resistor. --David