OttoDIY / OttoDIYPython

port of the OttoDIY Robot API (Otto9.h & Otto9Humanoid.h) to a micropython based platform
https://github.com/OttoDIY/OttoDIYPython
MIT License
21 stars 15 forks source link

add humanoid code #17

Closed sfranzyshen closed 3 years ago

sfranzyshen commented 3 years ago

update: code is up ... I'll push code here today that adds the humanoid code to this project ... the changes have already been added to the Arduino 'unified' OttoDIYArduino project ...

uses the same import and initialization for either Otto or Humanoid

import otto9
Otto = otto9.Otto9()

to initialize Otto, call things as you would normally ...

Otto.init(YL, YR, RL, RR, load_calibration, NoiseSensor, Buzzer, USTrigger, USEcho)

to initialize the Humanoid ... there are several ways ... including initHUMANOID() to stay 100% backwards compatible ...

Otto.init(YL, YR, RL, RR, load_calibration, NoiseSensor, Buzzer, USTrigger, USEcho, LA, RA)

Otto.init(YL, YR, RL, RR, LA = 4, RA = 5, load_calibration, NoiseSensor, Buzzer, USTrigger, USEcho)

Otto.initHUMANOID(YL, YR, RL, RR, LA, RA, load_calibration, NoiseSensor, Buzzer, USTrigger, USEcho)

essentially, Otto is a Humanoid with the arms not hooked up ... so we could just use the Humanoid code ... however, steps were taken to only init, and update the connect servos ... if you call 'arm only movements' and initialized as a Otto (not Humanoid) the call will be ignored ...

sfranzyshen commented 3 years ago

code is up but needs testing