Code Monkey home page Code Monkey logo

ticket_dispenser's Introduction

Ticket Dispenser

A simple concession ticket dispenser using:

Features

  • Enter # to dispense, hit # on the keypad, it dispenses then resets
  • Display updates as you type in your #
  • State machine that will only allow a ticket to be counted if certain conditions exist to cut down 'bad' counts
  • Empty roll detection - if 3 seconds passes without detecting a ticket, it will automatically cut-off. Time is adjustable.
  • Cancel active job by pressing asterisk *
  • Entered over 4 digits, program resets (limit of display)
  • If you hit the process key (#) with no numbers entered, it resets

Dispensing Mechanism:

DL-1275 Wiring

  • Blue Wire : 12 : Optical sensor (ticket count trigger)
  • Black Wire : GND : Ground
  • White Wire : 11 : DC Motor driver : on/off
  • Red Wire : Vin : 12V constant

Keypad

Using Membrane 3x4 Matrix Keypad : https://www.adafruit.com/

Keypad Wiring:


7 Segment Display

Using Adafruit 0.56" 4 digit 7 segment display w/I2C Backpack : https://www.adafruit.com/

7 Segment Display Wiring:

  • + = 5v
  • - = GND
  • D = A4
  • C = A5

Youtube

ticket_dispenser's People

Contributors

nanosplit avatar

Stargazers

Phil Helm avatar JeremyKeenan avatar  avatar Micah Adams avatar

Watchers

Micah Adams avatar James Cloos avatar  avatar

ticket_dispenser's Issues

Refactoring

Entire refactor needs to be done to move all logic out of the main loop and into functions. Something along the lines of:

void loop() {
    readInput();
    updateDisplay();
    dispsenseTickets();
}

void readInput() {
    // do something to read the input
}

void updateDisplay() {
    // do something to update the display with # inputted
}

void dispenseTickets() {
    // do something to dispense the tickets based on the # inputted
}

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.