Skip to content

port of the OttoDIY Robot API (Otto9.h & Otto9Humanoid.h) to a micropython based platform

License

Notifications You must be signed in to change notification settings

OttoDIY/OttoDIYPython

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c56a795 Â· Mar 25, 2024
Feb 10, 2024
Sep 22, 2020
Sep 2, 2020
Oct 28, 2019
Sep 23, 2020
Sep 29, 2020
Jan 28, 2021
Nov 28, 2020
Sep 24, 2020
Sep 29, 2020
Sep 29, 2020
Sep 23, 2020
Nov 28, 2020
Sep 23, 2020
Nov 24, 2020
Mar 23, 2024
Dec 21, 2020
Nov 8, 2020
Feb 10, 2024
Dec 21, 2020
Dec 21, 2020

Repository files navigation

OttoDIYPython

This is a port of the OttoDIY Robot API (Otto9.h & Otto9Humanoid.h) to a micropython based esp platform

This project has just begun ... it's not ready for use yet ... please look at the issues to see if you can help make this a reality ...

we now have added the humanoid support 😄 ... Read this issue post to see how it's used ...

The Motion Code has been ported ... and a test file has been created ... to test this out

  1. Install Micropython onto your microcontroller (I used a esp8266 nodemcu board)
  2. Upload these files on to the board ... Use uPyCraft or ampy
  3. run the Otto_allmoves_V9.py file from the REPL with the following command

>>> exec(open('./Otto_allmoves_V9.py').read(),globals())

Example Code

"""
Otto All moves python test 
OttDIY Python Project, 2020 | sfranzyshen
"""
import otto9, time

Otto = otto9.Otto9()
Otto.init(5, 12, 13, 14, True, 0, 1, 2, 3)
Otto.home()

Otto.walk(2, 1000, 1) #-- 2 steps, "TIME". IF HIGHER THE VALUE THEN SLOWER (from 600 to 1400), 1 FORWARD
Otto.walk(2, 1000, -1) #-- 2 steps, T, -1 BACKWARD 
Otto.turn(2, 1000, 1) #-- 3 steps turning LEFT
Otto.home()
time.sleep_ms(100)  
Otto.turn(2, 1000, -1) #-- 3 steps turning RIGHT 
Otto.bend(1, 500, 1) #-- usually steps =1, T=2000
Otto.bend(1, 2000, -1)     
Otto.shakeLeg(1, 1500, 1)
Otto.home()