Giter VIP home page Giter VIP logo

stm32-bluepill-scservo-library's Introduction

STM32 BluePill SCServo library

STM32 BluePill SCServo (Waveshare/FeeTech) SDK port for LL

Library uses STM32 USART Single Wire (Half-Duplex) and controls motor directly without TTLinker / SCM-1 / FE-URT-1 / Buffer Circuits etc.

In USART Single Wire mode Pin is configured as open-drain and require external pull-up resitor (~500..1000 Ohm) to 3.3V.

  ┌──────┐          6..8V        ┌──┬─────┬──┐
  └─┬──┬─┘            ▲          │  │ USB │  │
┌───┴──┴───────────┐  │          │  └─────┘  │
│                  │  │   ┌───3V─┤ 3.3V      │
│                  │  │  ┌┴┐     │           │
│              PWR ├──┘  │ │ 1kΩ │           │
│  SC15            │     │ │     │  BluePill │
│                  │     └┬┘     │           │
│             DATA ├──────┴───30─┤ PA9       │
│                  │             │           │
│                  │             │           │
│              GND ├──────┬──GND─┤ GND       │
└──────────────────┘      │      └───────────┘
                          │
                         ─┴─

Library itself is well-designed, but some modifications were required for use with LL.

How to use

  • Add as submodule or clone into your project folder.
  • Configure in CubeMX (Cube configuration tool) USART as Half-Duplex (default servo baudrate is 1000000), enable USART Global Interrupt, code generation LL.
  • In code:
    • Put USART_HD_IRQHandler() into USARTx interrupt routine
    • Call USART_HD_PostInit() after peripheral initialization
  • Use

Note

There is a variable in SCS.c called End, which determines endiannes conversion between servo and mcu. For STM32 it should be set to 1.

Source: FeeTech SCS SDK

stm32-bluepill-scservo-library's People

Stargazers

 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.