Pololu Robotics & Electronics
Menu
My account Comments or questions? About Pololu Contact Ordering information Distributors

Pololu Forum

Sensors and maestro

I have my maestro 12 operating with a few servos, in the pololu maestro intro video it was touched on that sensors can be used to control the servos also. This is very cool. I would like to find out more about this.

Are the sensors activating a second sequence of frames recorded on in the chip, separate to the looped first sequence? or is more of a simple on off deal ?

Do you have a tutorial or video specifically about how sensors work with the maestro ?

I am making an animatronic critter that has a base loop sequence of frames, and I want to make it so if a person pets the head, a touch or ligh sensor is activated that causes a second animation sequence. How would I best achieve this result ?

Hello, Bubblypies.

To connect a sensor to the Maestro, you will first need to configure the desired Maestro channel as an input from the “Channel Settings” tab of the Maestro Control Center. However, the Sequencer built into the Maestro Control Center cannot use inputs directly, so in order to do anything useful with the input, you will need to write your own script for handling it. Please note that you can copy your sequences to the script, so it could still be helpful to create sequences.

When configured as inputs, channels 0-11 (i.e. all of the channels on the 12-channel Mini Maestro) are analog, and the get_position script command will return a value between 0 and 1023 as the voltage changes from 0V to 5V.

I recommend going through the Example Script section of the Maestro user’s guide to get a better idea of how you can use the sensor to trigger your servos. In particular, the “Using an analog input to control servos”, “Using a button or switch to control servos”, and “Using multiple buttons or switches to control servos” examples are probably the most relevant. If you are new to Maestro scripting, reading through the whole Maestro Scripting Language section can be very helpful as well.

Brandon