Git Product home page Git Product logo

cybergear_m5's Introduction

cybergear_m5

M5 stack library for cybergear

"Remember, with great torque comes great responsibility."

Supported framework

  • Arduino for ESP32

Supported device (ESP32)

  • M5Stack Basic V2.7

H/W Components

H/W Connection

image

How to use Official GUI tool

This software requires a specific CAN to USB module. The official documentation recommends YourCee's USB to CAN module, which supports the serial protocol with a frame header of 41 54 and frame tail of 0D 0A, but this is not readily available, so we searched Aliexpress for an alternative. ※ Note that this will not work for general modules.

Tested(for reference):

Recommended pre-crimped cables

How to run sample

Arduino IDE

  1. Clone MCP_CAN_LIB and cygergear_m5 to Arduino Library directory.
cd ~/Arduino/libraries
git clone https://github.com/coryjfowler/MCP_CAN_lib.git
git clone https://github.com/Locoduino/RingBuffer.git
git clone https://github.com/project-sternbergia/cybergear_m5.git
  1. Open cybergear_m5/examples/control_mode_example.ino with Arduino IDE

    image

    Put this file in the same folder as control_mode_example.ino (for Arduino IDE)

  2. Build and write firmware to M5Stack

Sample Code

control_mode_example.ino

Check cybergear behaviour using M5 stack.

  • Middle Button - Change Control Mode (Position Mode -> Speed Mode -> Current Mode)
  • Right Button - Increase control value
  • Left Button - Decrease control value

CyberGear_M5_Control_Mode

cybergear_bilateral.ino

This example use two cybergears for leader and follower. Before you test this example, please change cybergear can id as follows. After that write cybergear_m5/examples/cybergear_bilateral.ino to m5 stack throughout Arduino IDE.

  • leader cybergear : 0x7F
  • follower cybergear : 0x7E

CyberGear_Bilateral

References

  • Xiaomi Cybergear 微电机使用说明书

LICENSE

MIT

cybergear_m5's People

Contributors

chikuta avatar plastic-gear avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.