Giter Club home page Giter Club logo

rotaryencoder's Introduction

Rotary Encoder Library for GR-CITRUS

Japanese README (和文ドキュメント)

Rotary encoder positioning library for GR-CITRUS


Global objects

Name Phase A input pin Phase B input pin Occupied timer resouce
Encoder1 4 19 TPU1
Encoder2 2 3 TPU2
Encoder3 11 12 MTU1
Encoder4 10 13 MTU2

Encoder n .begin()

Begins positioning of rotary encoder.

Encoder n .clear()

Clears the position count value.

Encoder n .read()

Reads the position count value. The return value is a unsigned 16-bit integer.


Notes

This library uses MTUs (Multi function timer pulse units) and TPUs (16-bit timer pulse units). Therefore, it conflicts with PWM output (Servo library and analogWrite) of other than pin 1,5,7,8,11. Additionally, it also conflicts with MsTimer2 and WaveMp3p. Timer resouces used by their libraries are shown below.

  • PWM output
    • 0: MTU1 (conflicts with Encoder3)
    • 1: TPU3
    • 5: TPU4
    • 7: TPU0
    • 8: TPU0
    • 11: MTU3
    • Others: TPU2 (conflicts with Encoder2)
  • MsTimer2: TPU1 (conflicts with Encoder1)
  • WaveMp3p: MTU1 (conflicts with Encoder3)

rotaryencoder's People

Contributors

lipoyang avatar

Stargazers

 avatar

Watchers

 avatar  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.