示例#1
0
def stand():
	print 'Received stand!'
	motion.stand()
	return ''
示例#2
0
# command line version of motion to test setups
import motion

import argparse

parser = argparse.ArgumentParser(description='Operate Hexapod.')
parser.add_argument('action', help='The action to take (e.g. stand, forward, assembly)')

args = parser.parse_args()

if args.action == "stand":
	print "standing!"
	motion.stand()
elif args.action == "assembly":
	print "assembly!" 
	motion.assembly() 
elif args.action == "forward":
	print "forward!" 
	motion.forward(1)
else:
    print "You asked for something the hexapod can\'t do"