ESP32 IoT Future Board Kittenblock Programming Tutorial 09 - Future board and Robotbit

The Robotbit expansion board not only extends some IOs of the Future board with DuPont pins, but also has a motor and a servo drive on the board. So in this tutorial, we will learn to make servos and motors work.

Future board on Robotbit

 

 Programming Blocks

Block

Introduction

1 expansion board init

Establish the Robotbit's IIC communication. It must be initialized before use.

2 motor m1a speed 100

Set the speed of the motor (positive and negative determine the direction of rotation)

3 Stop all

Stop all motors

4 blue 9g servo port s1 degree 90

Set the angle of the blue 9g motor (from 0 to 180 degrees)

5 geek 9g servo port s1 degree 90

Set the angle of the 9g geekservo motor (from -45 to 225 degrees)

6 geek 2kg servo port s1 degree 90

Set the angle of the geekservo 2kg motor (from 0 to 360 degrees)

7 stepper rotate m1 360 m2 -360

Make the stepper motor rotate according to the angle (positive and negative determine the direction of rotation)

8 stepper rotate m1 360

 

Example

  1. If the Robotbit cannot be detected during initialization, the following warning will pop up and block the program. After the expansion board is plugged in, the program will continue to execute
  1. Since the power supply of the motor and servo drive interface comes from the lithium battery on the Robotbit, it is necessary to turn on the power switch of Robotbit

 

📋: Drive the motor

Wiring

program 1 wiring

Program

program 1

 

📋: Drive the stepper motor

Wiring

program 2 wiring

Program

program 2

 

📋: Drive the geekservo 9g motor

Wiring

program 3 wiring

 

Program

 

📋: Drive the geekservo 2kg motor

Wiring

 

Program

 

 

📋: Drive the blue 9g motor

Wiring

 

program

 

If you have any question, please feel free to contact us at Discord, we will always be there to help.

 

KittenBot Team

Leave a comment

Please note, comments need to be approved before they are published.

SUBHEADING

Blog posts