Petoi Doc Center
🇺🇸English
🇺🇸English
  • Welcome to Petoi Doc Center
  • Getting Started Guide
  • 🙋‍♂️FAQ(Frequently Asked Questions)
  • Petoi robot joint index
    • Joint Pins on NyBoard
      • Nybble
      • Bittle
    • Joint Pins on BiBoard V0
      • Bittle X
      • Bittle X+Arm
    • Joint Pins on BiBoard V1
      • Bittle X
      • Bittle X+Arm
      • Nybble Q
  • Bluetooth Connection
    • BiBoard
    • NyBoard
  • Upload Firmware
    • NyBoard
    • BiBoard V0
    • BiBoard V1
  • Joint Calibration
  • Infrared Remote
    • Remote Controller
  • Mobile App
    • Introduction
    • Calibrator
      • Nybble
      • Bittle
    • Controller
  • Desktop APP
    • Introduction
    • Firmware Uploader
      • NyBoard
      • BiBoard V0
      • BiBoard V1
    • Joint Calibrator
      • NyBoard Preparation
      • BiBoard Preparation
      • Nybble
      • Bittle / Bittle X
        • Bittle (NyBoard)
        • Bittle X (BiBoard V0)
        • Bittle X (BiBoard V1)
      • Bittle X+Arm
        • BiBoard V1
        • BiBoard V0
    • Skill Composer
      • NyBoard Connection
      • BiBoard Connection
      • Interface
        • Nybble
        • Bittle / Bittle X
        • Bittle X+Arm
    • Tools
  • Block-based programming
    • Petoi Coding Blocks
      • NyBoard Preparation
      • BiBoard Preparation
    • Block-based Coding Curriculum - Learn Quadruped Robotics for Beginners
    • Python coding mode in Mind+
    • Generic Arduino Uno Blocks
    • Install Mind+ on Chromebook
  • Arduino IDE
    • Upload Sketch for NyBoard
    • Upload Sketch for BiBoard
    • Calibrate the joints with Arduino IDE
    • Serial Monitor
    • C++ Curriculum: Learn Quadruped Robotics for Beginners
    • Install Arduino IDE on Chromebook
  • Free Curriculum
    • 📚Download
  • APIs
    • 🖇️Serial Protocol
      • Feedback servos
      • Nested task queue and signal generator
    • 🐍Python API
    • 🐛8266 MicroPython controller
      • Run MicroPython on ESP8266
      • Setup WebREPL
      • Using the ESP-NOW protocol
    • 🦎8266 Arduino C Controller
    • ©️C++ API
    • 🍓Raspberry Pi serial port as an interface
      • For BiBoard V1
    • 💻Set up Development Environment on Chromebook
    • 🤖ROS
  • Nyboard
    • Overview
    • NyBoard V1_0
    • NyBoard V1_1 & NyBoard V1_2
  • BIBOARD
    • BiBoard V0 Guide
    • BiBoard Extension Hat
    • Demo Applications
      • 1.GPIO port
      • 2.Serial port
      • 3.Analog-digital converter
      • 4.Digital-Analog Converter
      • 5.EEPROM (Electrically Erasable Programmable read only memory)
      • 6.Gyro IMU(MPU6050)
      • 7.Infrared remote control
      • 8.PWM(Pulse Width Modulation)
      • 9.Servo(under construction)
      • 10.Classic Bluetooth serial port SPP
      • 11.Bluetooth low energy (BLE) serial port pass-through
      • 12.File system SPIFFS
      • 13.Add hardware partition configuration option in Arduino IDE
      • 14.Play MP3
      • 15.The usage of Wi-Fi OTA(Over-The-Air)
    • BiBoard V1 Guide
  • Communication Modules
    • Introduction (For NyBoard)
    • USB Uploader (CH340C or CH343G)
    • Dual Mode Bluetooth
    • WiFi module ESP8266
      • ESP8266 + Python Scripts Implement wireless crowd control
  • Extensible Modules
    • Introduction
    • MU Camera
    • Ultrasonic Sensor
    • Light Sensor
    • Touch Sensor
    • Gesture Sensor
    • PIR Motion Sensor
    • IR Distance Sensor
    • Voice Command Module
    • Petoi AI Vision Module
    • Advanced development and application of AI vision modules
      • Model Training
      • Model quantification
      • Model deployment
      • Training on the COCO DIY dataset
    • Robot Arm
      • Upgrade your older Bittle/Bittle X for the robotics arm gripper
    • 🎮Joystick with Micro:Bit
  • Applications
    • Melody Creation
    • Skill Creation
    • OpenCat Imitation Tutorial
    • Programmable Puppet Character
    • Tutorial for simulating Bittle In Isaac Sim
  • History
    • Upload Sketch For NyBoard (software 1.0)
  • Technical Support
    • 💾Supporting Application and Software
    • 🔧Burn Bootloader for NyBoard
    • 🛠️Useful Tools
    • 🔋Battery
  • Useful Links 🕸
    • 🔭Home of Petoi Robots
    • 🛒Shop Coding Robots
    • 💿GitHub of OpenCat
    • 🎪PetoiCamp (Forum)
    • 📽️Petoi Robot Videos
    • 📬Users' repositories
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. APIs
  2. Serial Protocol

Feedback servos

PreviousSerial ProtocolNextNested task queue and signal generator

Last updated 11 days ago

Was this helpful?

We introduced the position feedback feature for servos manufactured after March 2024. This feature utilizes the same PWM signal wire to return the servo's actual position, opening up a new control interface for the robot.

This feature should be present on all servos with labels or laser marks after May 2024. If the labels are missing, they may still have it. However, the feature is only available on ESP32-based BiBoards (not NyBoards).

To check it, you need to upgrade your robot's firmware. Enter the serial command 'f' in or the . If the monitor keeps printing values that change when you move the servos, they are position feedback. The number of columns corresponds to the number of servos with feedback.

The servos have to be all feedback servos to perform the following features:

  1. Movement following

    • Serial monitor: send serial command "fF", then slowly drag one of the legs. The other legs will follow the motion. Send another serial command to quit.

    • Mobile app: create called "following"(customizable) and use the code: fF create called "Quit"(customizable) and use the code: d to quit this mode.

  1. Do joint calibration automatically

    • Serial monitor: send serial command "c16". The robot will enter its resting posture. Push the robot down flat onto the table, move its head straight forward, and send a space character(‘ ’) in the serial monitor. The robot will automatically set the calibration values of all its joints. Some joints can still be off and require standard calibration, but it saves most of the time.

  2. Learn new skill by rotating servos

    • Serial monitor: send serial command 'fl', which means learning new movements. Move the legs to your intended starting position, then keep the robot steady for about 2 seconds. The robot will count down and then beep slightly to indicate that it has started recording. It won't record small movements, so you can pause in the middle. After 124 frames, if you enter any character in the serial monitor or stop moving it for over 2 seconds, it will stop recording. Send serial command 'fr', which means replay to recall the taught movement.

If you wish to write new applications based on the feedback servo, refer to the source codes in OpenCatEsp32/src/espServo.h.

Mobile app: create called "auto cali step 1"(customizable) and use the code: c16 . The robot will enter its resting posture. Push the robot down flat onto the table, move its head straight forward. Create called "auto cali step 2"(customizable) and use a space character as the code: to continue to automatic calibration step. The robot will automatically set the calibration values of all its joints. Some joints can still be off and require standard calibration, but it saves most of the time.

Mobile app: create called "start learning"(customizable) and use the code: fl which means learning new movements. Move the legs to your intended starting position, then keep the robot steady for about 2 seconds. The robot will count down and then beep slightly to indicate that it has started recording. It won't record small movements, so you can pause in the middle. After 124 frames, if you enter any character in the serial monitor or stop moving it for over 2 seconds, it will stop recording. Create called "replay"(customizable) and use a space character as the code: fr to which means replay to recall the taught movement.

The skill will also be printed on the (as pictured below), and you can import it into and the .

🖇️
a mobile app command
a mobile app command
a mobile app command
a mobile app command
serial monitor
SkillComposer
smartphone app
Arduino's serial monitor
mobile app's customized button
a mobile app command
a mobile app command