I created a Halloween prop called Reaper Puppet Master. It uses 7 servos and 1 linear actuator. Servos are controlled with Mini Maestro 24. Here is a video of prop: https://youtu.be/xcl0qEFomu8
If anyone is interested, let me know and I can add some more detail.
Happy Haunting!
I need help with two small programming issues:
I need to delay at startup (maybe 10 seconds) before the script starts. I know there is a checkbox on the script screen to “run script on startup” but I would like to delay running script for a bit if possible. I only need the delay at startup.
I would like to add a second “scene” to my prop. Each time the prop is triggered, it would play one of the scenes. The next time it is triggered, it would play the OTHER scene. I would need to have some sort of flag or variable in the script the I can turn on/off to toggle between the two scripts. What would be the easiest way to do that?
Here is my current script. I am monitoring my trigger on channel 20.
Your prop looks great (though a demo with the lights off would have been even better)!
You can use the delay command for delays of approximately 32 seconds or less. For example:
10000 delay # this will delay for 10 seconds
To delay upon startup, you should insert that line of code at the start of your script, before begin.
As for adding a second scene like that, you can add some blocking code that waits in a loop until channel 20 is low again. You can add the following subroutine at the end of your main loop (i.e. after repeat):
sub wait_for_trigger
begin 20 get_position 100 greater_than while repeat
return
And then replace begin 20 get_position 100 less_than if with a call to that subroutine, and also make a call to that subroutine at the end of scene 1. So, something like this should work:
10000 delay
begin
wait_for_trigger
play_scene_1
wait_for_trigger
play_scene_2
repeat
The subroutines play_scene_1 and play_scene_2 would contain all of the servo movements you want to achieve in those respective scenes. You do not have to make them subroutines, but it is easier to see how to implement wait_for_trigger when written out like above.
Thanks Nick. Considering I knew nothing about servos 3 months ago, I was pretty happy with how it turned out. The maestro controller is pretty slick and user friendly.
Yes, the reaper voice is mine. I recorded it on a Tascam 8 track recorder that I have, added some echo and then slowed the pitch down using Audacity.
The acceleration and speed channel settings limit how fast the speed and position of a servo change, respectively. Configuring a channel setting value of 0 removes the restriction, which will allow the servos to be commanded as quickly as the Maestro can send its signals.
To get more speed from a servo, you will have to supply a higher voltage to it (how fast a servo can rotate varies directly proportionally to the voltage supplied). If you plan on doing that, be sure to check the maximum voltage your servos can handle, first.