Skip to content

Latest commit

 

History

History
104 lines (77 loc) · 6.41 KB

README.md

File metadata and controls

104 lines (77 loc) · 6.41 KB

Programming

Firmware and App by Maarten Weyn

This Project currently lacks the whole programming/software part. Luckily Maarten Weyn already made the inverse kinematics work and wrote also an Smartphone App for simple Control of this Robot via BLE. Take a look into his Repository as well: https://github.com/maartenweyn/SpotMicro_ESP32

Quickstart Maartens Firmware

  • calibrate your servos (do this before assembly, otherwise you have more work to do). You can find here a quick explanation of how to achieve this.
  • install the ESP-IDF in VSCode for the firmware-developement and get Cordova for the app-developement running
  • clone maartens firmware-repo and
    • account for the missing relay in his code. You can overcome the relay being in the way in two ways:
      • connect NC instead of NO (always active after power-up, if no signal to the relay) to your PCA9685 V+ (terminal block) and switch it back, once you have a solid code-base that accounts for it.

      • OR do the code-thing right away and leave it as it is...like this: config.h

         #define RELAY_IO    27
        

        main.c -> void app_main()

         ...
         gpio_pad_select_gpio(RELAY_IO);
         gpio_set_direction(RELAY_IO, GPIO_MODE_OUTPUT);
         gpio_set_level(RELAY_IO,1); // 1 = on, 0 = off
        
    • clone the esp-dsp (digital signal processing) component into maartens repo's corresponding component folder
    • compile and flash
  • compile the cordova app and flash onto your android phone (or iphone, but i dont own an iphone and cant help here)
  • install arduino ide
    • get this firmware for your ESP32-CAM
    • add your local wifi credentials to the configuration
    • flash the ESP32_CAM with this firmware and access the live-stream/cam interface via your webbrowser

Firmware by Guna

An walking gait implementation and voice-commanding was achieved by Guna R. from the slacks #spotmicro-esp32 channel, whis is build upon Maartens software (see Repo above). You definitly have to take a look there as well and contribute: https://github.com/cholan2100/ceasar

Work-in-Progress : still a lot to do

This section currently contains some basic test-programs for servo-calibration and circuit-/module-tests.

Arduino IDE

You can use the Arduino IDE for the developement of your ESP32 programs. A good resource for the setup can be found here:

Setup Arduino IDE

ESP-IDF

The ESP-IDF is the developement framework provided by Espressif. Here's the official documentation how to get started:

Setup ESP-IDF

Quick Installation Guide - Downloads

If you don't want to get into the hurdle to install the ESP-IDF via the official documentation, you can follow this quick installation guide. It has been only tested for Windows 10 machines, so the Steps on Linux or Mac OS X will vary.

For a complete Installation you will need to install:

Quick Installation Guide - Steps

  1. Install Python by checking the "Add Python VERSION to PATH" checkbox and simply choose the "Install Now" option. If you are interested in a more detailed description how to further setup Python, it can be found here: Official Python Install Guide
  2. Install Git
  3. Install MinGW-w64 and choose a simpler installation directory path like C:\MinGW\
  4. Install VSCode - if you are interested in some more informations about the VSCode Setup than take a look at the Official VSCode Setup Documentation
  5. Start VSCode and
    1. install the C/C++ Extension from the VSCode Marketplace
    2. install the ESP-IDF Extension from the VSCode Marketplace. Use the Express Install as mentioned here: VSCode ESP-IDF Extension Github
      1. update some of your system variables
        1. add ";%IDF_PATH%\tools" to PATH
        2. add a new variable named "IDF_PATH" with the value "C:\Users\INSERT_YOUR_USER_DIRECTORY\esp\esp-idf"
    3. add the path to the MinGW C-Standard Libraries Headers to your C/C++ configuration in VSCode
      1. Press F1 for the Command Menu
      2. type and choose "C/C++: Edit Configuration (UI)" and navigate to the "advanced settings" at the bottom
      3. add your path (example below) to the browse.path:
        ${config:idf.espIdfPath}/components
        ${config:idf.espIdfPathWin}/components
        ${workspaceFolder}
        C:\MinGW\mingw64\x86_64-w64-mingw32\include
  6. Done!

Starting a new Project

Either open a available project/firmware (like the one from Maarten Weyn or Guna) in VSCode or start your own via:

  1. Add a folder to your Workspace "Edit -> Add Folder to Workspace"
  2. Press F1 for the Command Menu and type "ESP-IDF: Create Project" - a more detailed description can be found here: Official VSCode-ESP-IDF-Extension How-to-Use
    1. Choose the App-Template
    2. Change "project" within the CMakeLists.txt to whatever you want to call yours
  3. Have fun coding!

Everything you need to know, can be found in the Official ESP-IDF API Reference alongside with many linked example-projects to their Github Examples Page.