Error code in maestro

I have a Pololu Maestro 18 channel that I am using for a droid project. I had this working perfectly till my Arduino bit the farm. since then I have gotten a new Arduino with a USB host shield that works with the Bluetooth controller. problem is that I cannot get one of the maestro’s to come back to life on the controllers. I am using an Arduino mega2560 to call up the programs on the maestro. every time I do now I get an error code. thing is I only get it in one of the two maestro’s in the system though both are separate and called up differently in the Arduino program. I am going to post both of the codes one for the body maestro and the other for the head. it is the head one that is not currently working.

– head maestro program –

### Sequence subroutines: ###

# ARMS
sub ARMS
  500 0 0 0 0 3200 8384 
  3200 4800 8512 0 0 0 
  0 0 0 0 0 0 frame_0..17 # Frame 0
  500 9984 1600 frame_4_8 # Frame 1
  500 3584 8512 frame_5_6 # Frame 2
  500 3968 7968 frame_0_7 # Frame 3
  500 5696 6322 frame_0_7 # Frame 4
  500 7296 4800 frame_0_7 # Frame 5
  500 3968 7984 frame_0_7 # Frame 6
  500 7296 4800 frame_0_7 # Frame 7
  1000 8384 3200 frame_5_6 # Frame 8
  1000 3200 8512 frame_4_8 # Frame 9
  return
# LEFT ARM
sub LEFT_ARM
  500 0 0 0 0 3200 0 
  0 0 0 0 0 0 
  0 0 0 0 0 0 frame_0..17 # Frame 0
  500 9720 frame_4 # Frame 1
  1500 3200 frame_6 # Frame 2
  1500 8460 frame_6 # Frame 3
  1500 3303 frame_6 # Frame 4
  1500 8512 frame_6 # Frame 5
  500 3200 frame_6 # Frame 6
  500 3200 frame_4 # Frame 7
  return
# PARASCOPE
sub PARASCOPE
  500 0 0 0 0 0 0 
  0 0 0 0 0 0 
  0 0 0 0 0 0 frame_0..17 # Frame 0
  500 3968 3968 frame_1_2 # Frame 1
  500 7960 frame_1 # Frame 2
  500 8000 frame_2 # Frame 3
  500 3968 frame_2 # Frame 4
  500 8000 frame_2 # Frame 5
  500 3968 frame_1 # Frame 6
  500 0 0 frame_1_2 # Frame 7
  return
# RIGHT ARM
sub RIGHT_ARM
  500 0 0 0 0 0 0 
  0 0 8512 0 0 0 
  0 0 0 0 0 0 frame_0..17 # Frame 0
  500 1600 frame_8 # Frame 1
  500 8384 frame_5 # Frame 2
  1500 3584 frame_5 # Frame 3
  1500 8384 frame_5 # Frame 4
  1500 3584 frame_5 # Frame 5
  1500 8384 frame_5 # Frame 6
  500 8512 frame_8 # Frame 7
  return

sub frame_0..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
  0 servo
  delay
  return

sub frame_4_8
  8 servo
  4 servo
  delay
  return

sub frame_5_6
  6 servo
  5 servo
  delay
  return

sub frame_0_7
  7 servo
  0 servo
  delay
  return

sub frame_4
  4 servo
  delay
  return

sub frame_6
  6 servo
  delay
  return

sub frame_1_2
  2 servo
  1 servo
  delay
  return

sub frame_1
  1 servo
  delay
  return

sub frame_2
  2 servo
  delay
  return

sub frame_8
  8 servo
  delay
  return

sub frame_5
  5 servo
  delay
  return

– body maestro program –

### Sequence subroutines: ###

# DATA ARM
sub DATA_ARM
  500 0 0 0 0 0 0 
  3200 3200 8512 0 0 0 
  0 0 0 0 0 0 frame_0..17 # Frame 0
  500 7232 frame_7 # Frame 1
  500 6016 frame_8 # Frame 2
  500 7232 frame_6 # Frame 3
  500 3200 frame_6 # Frame 4
  500 7232 frame_6 # Frame 5
  500 3200 frame_6 # Frame 6
  500 8512 frame_8 # Frame 7
  500 3200 frame_7 # Frame 8
  return
# FRONT ARM FAST
sub FRONT_ARM_FAST
  500 3200 0 0 0 0 0 
  0 0 0 0 0 0 
  0 0 0 0 0 0 frame_0..17 # ARM START
  1000 8000 frame_0 # ARM OUT
  500 3200 frame_0 # ARM BACK IN
  return
# HEAD NOD
sub HEAD_NOD
  500 0 0 0 0 0 0 
  0 0 0 0 0 0 
  0 0 0 0 0 0 frame_0..17 # Frame 0
  500 6016 frame_11 # Frame 1
  500 5632 frame_11 # Frame 2
  500 6400 frame_11 # Frame 3
  500 5632 frame_11 # Frame 4
  500 6400 frame_11 # Frame 5
  500 6016 frame_11 # Frame 6
  500 0 frame_11 # Frame 7
  return
# SAW
sub SAW
  500 0 6749 6016 5632 0 0 
  0 0 0 0 0 0 
  0 0 0 0 0 0 frame_0..17 # START
  500 3200 frame_1 # DOOR OPEN
  500 8000 frame_3 # ARM UP
  500 8000 frame_2 # ACTION
  500 6016 frame_2 # ACTION
  500 5643 frame_3 # ARM DOWN
  500 6784 frame_1 # DOOR CLOSE
  return

sub frame_0..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
  0 servo
  delay
  return

sub frame_7
  7 servo
  delay
  return

sub frame_8
  8 servo
  delay
  return

sub frame_6
  6 servo
  delay
  return

sub frame_0
  0 servo
  delay
  return

sub frame_11
  11 servo
  delay
  return

sub frame_1
  1 servo
  delay
  return

sub frame_3
  3 servo
  delay
  return

sub frame_2
  2 servo
  delay
  return

Any help is appreciated.

Hello.

When it gets into an error state (indicated by the red LED), could you connect the Maestro to your computer and check which error being triggered? Could you post the settings files for each of your Maestros (being careful to indicate which one belongs to each Maestro) as well as the simplest possible Arduino code that demonstrates the problem?

By the way, I noticed that in both of your scripts all of the subroutines end with a return statement. So, if you are using the “Restart Script at Subroutine” command to call any of them, I expect that to end in an error (since the Maestro has nowhere to return to). If you want it to play that sequence once and stop, the subroutines you call from your script should end with a quit command.

Brandon

That might be my problem I forgot about the quit command between programming. I will check that and see if it might help.

1 Like

Well it turned out the maestro is dead. I put a new one in with the same programming and it worked right out of the gate but the previous one did not so I am assuming it is dead.

I’m sorry to hear about your Maestro, but I’m glad you were able to get your system working. If you haven’t done so already, you might try saving the settings file from your working Maestro and loading it onto your problematic Maestro, just in case there was something else in the settings that was causing the problem. (You can save or load a Maestro settings file from the “File” drop-down menu of the Maestro Control Center while the controller is connected.)

Brandon