Help with Button

Hello,

I’m new to this kind of thing and have dived into other forums for help but no luck. I’m in need of some help with making the button on my maestro 12 channel to work.

I’ve followed the section on the website explaining that I need to connect a resistor from 5v to the signal channel 0 and signal to the button, then button to ground channel 0. But no luck. It’s reading 255 in the target but never goes to 0 when clicking. Mode is also input instead of servo.

Any help I’d be so grateful!

Hello.

It is hard to tell from the angle of your picture, but it looks like you have the wiring correct. You might double check that you’re using the right pins on your button by using a multimeter to see if there is continuity when the button is pressed.

If that doesn’t help, could you post some more pictures of your setup to give a clearer view of your connections? Also, could you post a copy of your Maestro settings file? You can save a copy of your settings file from the “File” drop-down menu of the Maestro Control Center while the controller is connected.

Brandon

Hello Brandon,

Thank you for your reply! With your help I’ve managed to get the button to read 0 and 255!

Though now I am struggling with the script to allow the sequence to start when pushing the button on. I have copied an example script from a previos post but doesnt seem to start the script?

Here is the script at the moment.

begin  
  0 get_position 500 greater_than while  #wait in while loop until button connected to channel 0 is pushed
repeat
### Sequence subroutines: ###

# Sequence 0
sub Sequence_0
  500 6547 0 5824 0 5920 5952 
  0 5952 0 0 0 0 
  0 0 0 0 0 frame_1..17 # Frame 0
  500 2438 frame_1 # Frame 1
  500 delay # Frame 2
  500 9664 frame_1 # Frame 3
  500 9514 frame_3 # Frame 4
  500 1984 frame_3 # Frame 5
  500 9664 frame_3 # Frame 6
  500 7538 2244 6955 9792 2176 frame_1_3_5_6_8 # Frame 7
  500 9728 frame_8 # Frame 8
  500 2176 frame_8 # Frame 9
  500 9728 frame_8 # Frame 10
  return

sub frame_1..17
  17 servo
  16 servo
  15 servo
  14 servo
  13 servo
  12 servo
  11 servo
  10 servo
  9 servo
  8 servo
  7 servo
  6 servo
  5 servo
  4 servo
  3 servo
  2 servo
  1 servo
  delay
  return

sub frame_1
  1 servo
  delay
  return

sub frame_3
  3 servo
  delay
  return

sub frame_1_3_5_6_8
  8 servo
  6 servo
  5 servo
  3 servo
  1 servo
  delay
  return

sub frame_8
  8 servo
  delay
  return

Hello.

It probably makes sense to use an IF statement instead of a WHILE to check the state of the button in a loop, then call your Sequence_0 if it is pressed (i.e. reading less than 500). That would look something like this:

#begin loop
begin 

  #check button state
  0 get_position 500 less_than if 
    #if it's pressed, call Sequence_0
    Sequence_0
  endif

#loop back to the top
repeat

This is very similar to how the “Using multiple buttons for switches to control servos” example works from the “Example Scripts” section of the Maestro User’s guide, except there’s only one button and it doesn’t use a separate subroutine to check the button state.

Brandon