OttoNinja 开源项目教程

OttoNinja 开源项目教程

OttoNinjaBuild your own robot like a Ninja 🐱‍👤 This is the first emotional modular EdTech robot that can walk and roll!项目地址:https://gitcode.com/gh_mirrors/ot/OttoNinja

1. 项目的目录结构及介绍

OttoNinja 项目的目录结构如下:

OttoNinja/
├── Arduino
│   ├── Otto_BLE_BT
│   │   ├── Otto_BLE_BT.ino
│   │   └── ...
│   ├── Otto_DIY
│   │   ├── Otto_DIY.ino
│   │   └── ...
│   └── ...
├── CAD
│   ├── 3D_Parts
│   │   ├── Body
│   │   │   ├── Body.stl
│   │   │   └── ...
│   │   ├── Legs
│   │   │   ├── Leg.stl
│   │   │   └── ...
│   │   └── ...
│   └── ...
├── Documentation
│   ├── Images
│   │   ├── Otto_Assembly.jpg
│   │   └── ...
│   ├── Manuals
│   │   ├── Otto_Assembly_Manual.pdf
│   │   └── ...
│   └── ...
├── LICENSE
└── README.md

目录结构介绍

  • Arduino: 包含所有与 Arduino 相关的代码文件,如 Otto_BLE_BT 和 Otto_DIY 等。
  • CAD: 包含所有 3D 打印部件的设计文件,如 Body 和 Legs 等。
  • Documentation: 包含项目的文档,如图片和手册等。
  • LICENSE: 项目的许可证文件。
  • README.md: 项目的介绍和使用说明。

2. 项目的启动文件介绍

项目的启动文件主要位于 Arduino 目录下,例如 Otto_BLE_BT.inoOtto_DIY.ino。这些文件是 Arduino 项目的入口点,包含了初始化代码和主循环。

Otto_BLE_BT.ino

#include <Otto.h>
Otto Otto;

void setup() {
  Otto.init(2, 3, 4, 5, true, A0, 10, 9);
  Otto.sing(S_connection);
  Otto.home();
}

void loop() {
  Otto.walk(1, 1000, FORWARD);
  Otto.turn(1, 1000, LEFT);
}

Otto_DIY.ino

#include <Otto.h>
Otto Otto;

void setup() {
  Otto.init(2, 3, 4, 5, true, A0, 10, 9);
  Otto.sing(S_connection);
  Otto.home();
}

void loop() {
  Otto.walk(1, 1000, FORWARD);
  Otto.turn(1, 1000, LEFT);
}

3. 项目的配置文件介绍

项目的配置文件主要位于 Arduino 目录下的每个项目文件夹中,例如 Otto_BLE_BTOtto_DIY。这些配置文件通常包含项目的特定设置,如引脚配置、传感器校准等。

Otto_BLE_BT 配置文件

// Pin configuration
#define LEFT_LEG 2
#define RIGHT_LEG 3
#define LEFT_FOOT 4
#define RIGHT_FOOT 5
#define BUZZER A0
#define TRIG 10
#define ECHO 9

// Other configurations
#define BAUD_RATE 9600

Otto_DIY 配置文件

// Pin configuration
#define LEFT_LEG 2
#define RIGHT_LEG 3
#define LEFT_FOOT 4
#define RIGHT_FOOT 5
#define BUZZER A0
#define TRIG 10
#define ECHO 9

// Other configurations
#define BAUD_RATE 9600

以上是 OttoNinja 开源项目的教程,包含了项目的目录结构、启动文件和配置文件的介绍。希望这些信息能帮助你更好地理解和使用该项目。

OttoNinjaBuild your own robot like a Ninja 🐱‍👤 This is the first emotional modular EdTech robot that can walk and roll!项目地址:https://gitcode.com/gh_mirrors/ot/OttoNinja

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

时煜青

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值