SunFounder PiCrawler Kit
(continued from previous page)
new_step[i]=rise
new_step[(i+2)%4] = drop
new_step[(i+1)%4] = rise
new_step[(i-1)%4] = drop
crawler.do_step(new_step,speed)
##"[[right front], [left front], [left rear], [left rear]]")
def pushup(speed):
up=[[75, 0, -100], [75, 0, -100],[0, 120, -60], [0, 120, -60]]
down=[[75, 0, -30], [75, 0, -30],[0, 120, -60], [0, 120, -60]]
crawler.do_step(up,speed)
sleep(0.6)
crawler.do_step(down,speed)
sleep(0.6)
def swimming(speed):
for i in range(100):
crawler.do_step([[100-i,i,0],[100-i,i,0],[0,120,-60+i/5],[0,100,-40-i/5]],speed)
# main
def main():
speed = 100
swimming(speed)
pushup(speed)
handwork(speed)
twist(speed)
sleep(0.05)
if __name__ == "__main__":
main()
Note: Hello, welcome to the SunFounder Raspberry Pi & Arduino & ESP32 Enthusiasts Community on Facebook!
Dive deeper into Raspberry Pi, Arduino, and ESP32 with fellow enthusiasts.
Why Join?
• Expert Support: Solve post-sale issues and technical challenges with help from our community and team.
• Learn & Share: Exchange tips and tutorials to enhance your skills.
• Exclusive Previews: Get early access to new product announcements and sneak peeks.
• Special Discounts: Enjoy exclusive discounts on our newest products.
• Festive Promotions and Giveaways: Take part in giveaways and holiday promotions.
Ready to explore and create with us? Click [] and join today!
3.15. Emotional Robot 81