Code Monkey home page Code Monkey logo

rotarydial's Introduction

Rotary Dial Arduino Library

This library was written for use with the dial pictured above (Dial from Czech telephone Tesla AS-10, green and yellow wire). But it should work with anything capable of producing bursts of pulses.

This implementation is for the North American system, where [1, 9] pulses correspond to the numbers [1, 9], and 0 is represented by 10 pulses.

Connection & Circuit

This library uses interrupts, so you have to connect the dial to pin which supports interrupts (this is different for different arduinos, but most common boards can do interrupts on pins 2 and 3).

Unfortunataly this library is static, so currently you can use it only once at a time (= with one dial).

Internal pullup is used, so all you need is to connect NC terminals of rotary dial to GND and Pin 2 (or whatever pin you choose in the code).

TODO

  • Possibility to register callback for processing received numbers
  • Make timing constants user configurable
  • Allow inverting of logic to use NO instead of NC dials (not sure if there are such)
  • Allow more than one dial at the same time
  • Provide method to detach interrupt if needed
  • Handle dial timeout directly in library? (= send ENTER when user is done typing numbers, currently we handle this in example sketch)

See also

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.