GithubHelp home page GithubHelp logo

antonagre / ottodiypython Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ottodiy/ottodiypython

0.0 0.0 0.0 1.42 MB

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

Home Page: https://github.com/OttoDIY/OttoDIYPython

License: MIT License

JavaScript 0.04% Python 72.71% HTML 27.25%

ottodiypython's Introduction

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()

ottodiypython's People

Contributors

mishafarms avatar sfranzyshen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.