🤖
LinkIt 7697 BlocklyDuino 使用指南
  • LinkIt 7697 BlocklyDuino 使用指南
    • 認識 LinkIt 7697
    • 認識 BlocklyDuino
    • BlocklyDuino v2 & v3 比較
    • 安裝開發環境 (v2)
      • 安裝 Arduino 編輯器
      • 安裝驅動並連接開發板
      • 安裝 BlocklyDuino 編輯器
      • 連結兩個編輯器並上傳程式
    • 安裝開發環境 (v3)
    • BlocklyDuino 基礎操作
    • 實作範例教學
      • A01. 內建 LED 閃爍
      • A02. 外接 LED 閃爍
      • A03. 外接 LED 呼吸燈
      • A04. RGB LED 顏色變化
      • A05. 外部按鈕控制開關
      • A06. 蜂鳴器播放聲音
      • A07 .可變電阻控制電壓輸出
      • A08. 伺服馬達控制
      • A21. DHT: 溫濕度感應器
      • A22. HTU21D: 溫溼度感應器
      • A23. PMSX003: PM2.5 感測器
      • A24. HC-SR04P: 超音波測距
      • A25. ADXL345: 加速規(動態)
      • A26. ADXL345: 加速規(手勢)
      • A27. 1602/2004: 液晶顯示模組
      • A28. WS2812: RGB 彩色燈條
      • A29. MFRC522: RFID
      • B00. Grove 相關基礎知識
      • B01. Grove 光感應器
      • B02. Grove 超音波測距感應器
      • B03. Grove 溫溼度感應器
      • B04. Grove 繼電器
      • B05. Grove LED 燈條
      • B06. Grove OLED 顯示器
      • C01. 雲端控制 LED 開關
      • C02. 上傳溫溼度到雲端
      • D01. 手機透過 BLE 讀寫裝置資料
      • E01. 遙控器: 按鈕控制 LED
    • 資源鏈結
  • LinkIt 7697 - Arduino IDE 開發指南
    • 環境設定
      • 設定 Arduino IDE
      • 將 LinkIt 7697 連接到電腦
        • 在 Windows 上安裝 CP2102N 驅動程式
        • 在 macOS 上安裝 CP2102N 驅動程式
      • 執行第一個程式
    • 開發指南
      • GPIO
      • UART
      • ADC
      • EINT (外部中斷 / External Interrupt)
      • I2C
      • SPI
      • EEPROM
      • Timer
      • Flash (索引式儲存空間)
      • RTC (Real-Time Clock)
      • Software Serial
      • 使用 Wi-Fi 函式庫
      • 使用 MCS 函式庫
        • 連接到 MCS
        • 連接到 MCSLite
          • 建立可透過 MCS Lite 控制的 Beacon
        • MCS 函式庫 API 使用手冊
          • MCSDevice
          • MCSLiteDeviceMCSLiteDevice
          • MCSDataChannel 相關類別
      • 使用 BLE 低功耗藍牙
        • 藍牙信標
        • 主控裝置
        • 周邊裝置
        • 已知限制
        • LBLE API 指南
          • LBLE
          • LBLECentral
          • LBLEPeripheral
          • LBLEAdvertisementData
          • LBLEService
          • LBLECharacteristic
          • LBLEAddress
          • LBLEUuid
          • LBLEClient
      • 使用 LinkIt Remote
        • LRemote API
        • LRemote 控制元件 API
      • LinkIt 7697 腳位的初始狀態
      • LinkIt 7697 供電說明
      • 更新 Bootloader 與韌體
      • Flash 燒錄工具
      • FOTA 更新
      • LinkIt 7697 的功能限制
      • 自行編譯 Arduino Package
      • 回報問題
    • 週邊元件連接教學
      • SMD 按鈕
      • RGB 三色 LED
      • 可變電阻
      • 九軸感應器 (MPU-9250)
      • 溫度與濕度感應器 (AM2302)
      • 超音波距離感應器
      • 光感應器 (LM358)
      • 0.96 吋 OLED 顯示模組 (SSD1308Z)
      • 長條型 LED 顯示模組 (MY9221)
      • 繼電器
      • 伺服馬達 (EMAX 9g ES08A Servo)
      • 使用 74HC595 驅動七段顯示器
      • 使用 MAX7219 驅動七段顯示器
      • 使用 MAX7219 驅動 8x8 矩陣式顯示器
      • 使用 OLED 模組 (如 SH1106 / SSD1306... 等模組)
      • 使用 PCF8574 / PCF8574A 驅動 1602 LCD
    • 開發套件與擴充板
      • Grove Starter Kit
      • Robot Shield
        • OTTO97
    • 下載
    • 資源連結
    • BSP 版本更新資訊
  • LinkIt 7697 - Development Guide for Arduino IDE
    • Environment Setup
      • Setup Arduino IDE
      • Connecting LinkIt 7697 to Computer
        • Install CP2102N Driver on Windows
        • Install CP2102N Driver on macOS
      • Run Your First Sketch
    • Developer Guide
      • GPIO
      • UART
      • ADC
      • External Interrupt
      • I2C
      • SPI
      • EEPROM
      • Timer
      • Flash (Key-Pair Storage)
      • RTC (Real-Time Clock)
      • Software Serial
      • Using the Wi-Fi Library
      • Using MCS Library
        • Connecting to MCS
        • Connecting to MCSLite
          • Build a Beacon controlled by MCS Lite
        • MCS Library API Reference
          • MCSDevice
          • MCSLiteDevice
          • MCSDataChannel Classes
      • Using Bluetooth
        • Beacons
        • Central Devices
        • Peripheral Devices
        • Limitations of LBLE library
        • LBLE Library API Guide
          • LBLE
          • LBLECentral
          • LBLEPeripheral
          • LBLEAdvertisementData
          • LBLEService
          • LBLECharacteristic
          • LBLEAddress
          • LBLEUuid
          • LBLEClient
      • Using LinkIt Remote
        • LRemote
        • LRemote Control Classes
      • Initial Pin State of LinkIt 7697
      • Powering the LinkIt 7697
      • Update Bootloader and Firmware
      • Flash Uploading Tool
      • FOTA Update
      • Limitations of LinkIt 7697
      • Source Code of Arduino Package
      • Issue Report
    • Tutorial
      • SMD Buttons
      • RGB LED
      • Potentiometer
      • IMU 9DOF v2.0 (MPU-9250)
      • Temperature and Humidity Sensor Pro (AM2302)
      • Grove Ultrasonic Ranger
      • Light Sensor (LM358)
      • Grove OLED Display 0.96" (SSD1308Z)
      • LED Bar v2.0 (MY9221)
      • Relay
      • Mini Servo (EMAX 9g ES08A Servo)
      • Driving 7-segment Displays with 74HC595
      • Driving 7-segment Displays with MAX7219
      • Driving 8x8 Dot Matrices with MAX7219
      • Using OLED module (SH1106 / SSD1306... etc.)
      • Driving 1602 LCD with PCF8574 / PCF8574A
    • Kits and Shields
      • Grove Starter Kit
      • Robot Shield
        • OTTO97
    • Download
    • Resources
    • BSP Release Notes
Powered by GitBook
On this page
  • Acknowledgement
  • License (CC-BY-SA)
  • Prerequisite Knowledge
  • Materials
  • Tools
  • Software
  • Building Instructions
  1. LinkIt 7697 - Development Guide for Arduino IDE
  2. Kits and Shields
  3. Robot Shield

OTTO97

PreviousRobot ShieldNextDownload

Last updated 3 years ago

OTTO97 (OTTO for LinkIt 7697) is a derived project from , it is a cute 2-feet robot that can be easily built with LinkIt 7697 + Robot Shield

OTTO can walk, dance, sing, detect obstacle and with mouth emotion animations

Acknowledgement

  • OTTO97 (OTTO for LinkIt 7697) is a derive project of OTTO DIY ( / / )

License (CC-BY-SA)

  • Thie project is licensed under a

Prerequisite Knowledge

  • Have the basic knowledge of using LinkIt 7697 with Arduino IDE, you can learn from

  • Understand how to use mobile app (iOS/Android) to connect to LinkIt 7697

  • Basic electric knowledge

  • Basic soldering skill (if you want to add the mouth)

Materials

  • LinkIt 7697 x1

  • for LinkIt 7697 (by MiniPlan) x1

  • MicroUSB cable x 2

  • Tower Pro SG90 Servo (Micro Servo 9g) x4 (with horns, 2 longer screws and 1 shorter screw)

  • Ultrasonic Sensor HC-SR04P (3V~5.5V) x1

  • MAX7219 8x8 LED Matrix x1 (optional)

  • Passive Buzzer x1 (3V~5V) optional)

  • 3D print parts (head, body, leg x2, foot x2)

  • F/F wires x 11

Please make sure you have chosen the following two components with wider working voltage, otherwise, it won't work properly

  • HC-SR04P for the Ultrasonic Sensor with 3V~5.5V working voltage. Do not choose HC-SR04 that only works with 5V, they may look almost identical from the outside.

  • Passive Buzzer with 3V~5V working voltage. Do not choose the one only works with 5V

Tools

  • Mobile Phone (to run the Calibration and Demo app)

  • 3D Printer

  • Soldering Iron (optional, used to re-work 8x8 LED Matrix for the mouth)

  • Instant Glu (optional, used to make the joints more rigid)

  • Other Tools for assembling

Software

  • Folder
    Description

    libraries

    OTTO and related library

    OTTO_Calibration

    A sketch to calibrate the servos and test all components, we will use this to assist building the OTTO

    OTTO_Demo

    A sketch to control basic movement of OTTO

    OTTO_UnitTest_Buzzer

    A sketch to test the passive buzzer

    OTTO_UnitTest_LEDMatrix

    A sketch to test the LEDMatrix

    OTTO_UnitTest_Servo

    A sketch to test the Servos

    OTTO_UnitTest_Ultrasonic

    A sketch to test the Ultrasonic sensor

    3D_STL

    3D print files

Building Instructions

Step 1: 3D Print OTTO Parts

  • You will have a head, body, leg x 2, left foot and right foot, totally six parts

Step 2: Download & Install Arduino Libraries & Applications

libraries folder can be found in the Sketchbook locations, which is defined in File > Preferences

Step 3: Prepare the Calibration UI

  • Open Arduino IDE, build and download the OTTO_Clibration.ino to LinkIt 7697 (the sketch you get it from Github)

  • Download & open the LinkIt Remote app on your mobile phone, you shall see a device call "OTTO CAL"

  • Click "OTTO_CAL to load the Calibration UI interface from you LinkIt 7697 through Bluetooth

Step 4: Connecting Servos

  • Plug-in LinkIt 7697 into Robot Shield, make sure the direction is correct (two USB ports at the same side)

  • Connect the LinkIt 7697's USB port to a PC for downloading the software

  • Connect the Robot Shield's USB port to a 5V power source (can also be a PC), keep charging the battery

  • Connect servos x 4 to the Robot Shield as follows

  • Switch on Robot Shield's power (shift to left side)

  • Press "Walk" button in the Calibration UI to see if 4 servos are rotating

  • Press "Home" or "Stiff" to restore the servos to its initial position

Home: Servos restore to its initial position (OTTO stand up-right) and will detach the servos, you can rotate the servo freely

Stiff: Servos restore to its initial position (OTTO stand up-right) and will NOT detach the servos and keep sending the PWM signal

We usually keep the servo "Stiff" when assembling the servo to the 3D print parts

Step 5: Connecting Ultrasonic Sensor

  • Bend the pins 90 degree

  • Connect the HC-SR04P to Robot Shield's P2 and P3

It is quite easy to connect the ultrasonic's wires to the wrong pin because both sides of the module have silk print on it, please double check the wirings!

  • Click the US Switch, you shall see the detected distance print through serial monitor

  • HC-SR04 (5V) & HC-SR04P (3V~5.5V) may look identical, please make sure your purchase the new version HC-SR04P

  • VCC on the Robot Shield is from the built-in Lithium battery ranging from 3.7V~4.5V, it can't drive HC-SR04 properly. If you are using the HC-SR04 (5V) version, you will always see the output as 999.00cm

Step 6: Connecting Passive Buzzer (Optional, only if you want your OTTO to sing)

  • Connect the Passive Buzzer to Robot Shield's P4

  • Click the BUZ Switch, you shall hear sounds coming out from the Passive Buzzer

Please use Passive Buzzer (requires PWM as source to play various tone) instead of Active Buzzer (just need a power source to play a single tone)

Step 7: Connecting 8x8 LED Matrix (MAX7219) (Optional, only if you want a mouth)

  • Due to the limited space in the OTTO's head, we will need to remove the pin headers of 8x8 Matrix LED and solder the wires directly to save more space. If you are not familiar with soldering, you may skip this step and add them back later

  • We will check the 8x8 LED Matrix first before start reworking, connect the 8x8 LED Matrix to P7, P8, and P9

  • Click the LED Switch, you will see patterns displaying on the 8x8 LED Matrix

  • If the 8x8 LED Matrix works properly, we can start reworking (soldering required)

  • Cut-off the output pin headers

  • Remove the input pin header, solder 5 wires to those pin holes from the backside of the LED Matrix module (scroll down for detail steps)

  • Connect the 8x8 LED Matrix to Robot Shield again and check if it displays correctly

How to Remove Pin Headers

Cut the input pin headers

Remove the pin header (may use slap method)

Prepare the 5 wires (approx. 5 cm)

Insert the wires from the backside and solder them firmly to the holes

Congraduation, we have done testing all the electronic parts~ we can start to assemble the mechanical parts

You may remove all cables at this stage, we will put them back one-by-one at later steps

Step 8: Assemble the LEFT LEG (P15)

  • Unpack a SG90, you will find a servo, 3 horns, and 2 longer screws and 1 shorter screw, we will not use the two long horns in this project

  • Mount a servo to the BODY (Left Leg) with 2 longer screws

  • Connect the servo to P15, use LinkIt Remote (mobile app) to connect to LinkIt 7697 and open the control UI, press Stiff to adjust the servo to its initial position (which make OTTO stand upright)

  • Both LEGs' 3D print parts are identical, just pick one of them

  • Cut the horn to fit into the LEFT LEG's groove, make sure the side connected to the servo shall be as even as possible, it will the main reason why your OTTO cannot walk straight

You may use some instant glue to secure the horn and the leg to make the joint more rigid. Do not do it before every detail adjustment is done

  • Assemble the LEFT LEG to the body, try to fit in as aligned as possible. There might be 1~2 degree of misalignment, we will use the calibration app to adjust it later

  • Fasten the horn (on the leg) to the servo (on the body) with the shorter screw tightly. It is very important to have a sturdy joint for OTTO to walk straight

Step 9: Assemble the RIGHT LEG(P16)

  • Follow the same instruction for the RIGHT LEG, the servo is connected to P16

  • Use the LinkIt Remote calibration UI to calibrate the legs, remember to Save the calibrated result

Step 10: Assemble the LEFT FOOT (P5: LF)

  • Pass the servo wires through the holes of the LEFT LEG and BODY, and connect to the Robot Shield's P5 again

  • Using the calibration mobile App to move the servo to its initial position ("Stiff")

  • Pick the LEFT FOOT 3D print part, and cut the horn to fit into the LEFT FOOT's grove

  • Assemble the servo & horn to the LEFT FOOT with the shorter screw

  • Fold the cable and squeeze the servo into the LEFT LEG

  • Fasten a longer screw to secure the servo to the LEFT LEG (the screw won't be very tight)

Step 11: Assemble the RIGHT FOOT (P11: RF)

  • Follow the same instructions above for the RIGHT FOOT, using the servo connects to P11

  • User the Calibration UI to calibrate the angle between the foot and the surface.

  • Make sure the foot stood flat on the surface, and save it

Step 12: Assemble the Robot Shield to the BODY

  • Iis better to have the FEET's wires closer to the rear part of the body

  • Slide in the Robot Shield's connectors to the BODY's connector hole at its rear side

  • Fasten the Robot Shield with the screws comes with the Robot Shield (you can just fasten two diagonal screws)

Step 13: Put back the Ultrasonic Sensor, Buzzer, and 8x8 LED Matrix

  • Let's re-connect the testes components back to the Robot Shield

  • Insert the Buzzer to the round compartment at the bottom of the BODY part, facing downward, and re-connect the cables to the Robot Shield

  • Insert the Ultrasonic Sensor to the HEAD and re-connect the cables to the Robot Shield

  • Stick a tape behind the 8x8 LED Matrix to avoid short with the Robot Shield and re-connect it to the Robot Shield

  • Insert the LED Matrix into the front compartment of the BODY

  • Assemble the HEAD to the BODY, OTTO is ready to GO!!

Step 14: Run the DEMO App

  • Open the OTTO_Demo.ino in Arduino IDE and download to LinkIt 7697

  • Use LinkIt Remote to connect to your OTTO and load the control UI from LinkIt 7697, you will see a control panel

  • Let's play with your OTTO~

Source code can be found

Download and print the 3D files from , some of these STL files have been modified from the original OTTODIY to be able to fit in the LinkIt 7697 + Robot Shield

Download the libraries and applications from , unzip it and put them in the Sketchbook locations

Cut the output pins

https://github.com/bearwbearw/OTTO97
Thingiverse
GitHub
https://youtu.be/4FGtW8HOYKM
OTTODIY
Offical Site
Github
Thingiverse
Creative Commons Attribution-ShareAlike 4.0 International Licens
LinkIt 7697 - Development Guide for Arduino IDE
LinkIt Remote
Robot Shield