BaseBall pitching Code sample - NewBie


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    Apr 2007
    Location
    KC MO
    Posts
    7

    Default BaseBall pitching Code sample - NewBie

    Newbie here. I have an idea of a backboard that a baseball pitcher can throw at and it will display strikes, outs and balls... with two switches.
    Being my first time trying this can you all take a look or better yet try it on a test board ? I do not have my parts ordered yet and would like to get a idea of what I'm needing.. I have based the code on a 16f684 chip.

    Include is baseball.zip
    Attached Files Attached Files

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by foxstar View Post
    Newbie here. I have an idea of a backboard that a baseball pitcher can throw at and it will display strikes, outs and balls... with two switches.
    Being my first time trying this can you all take a look or better yet try it on a test board ? I do not have my parts ordered yet and would like to get a idea of what I'm needing.. I have based the code on a 16f684 chip.

    Include is baseball.zip
    My question is...how are you going to do all of the sensing in and out of the strike zone? Pressure switches, light beams?

  3. #3
    Join Date
    Apr 2007
    Location
    KC MO
    Posts
    7


    Did you find this post helpful? Yes | No

    Default

    Think of a 4 by 6 foot tic-tac-toe board. the center plate is the strike zone, all the outer plates are the balls zones. Each plate floats on springs and when hit, pushes on a switch. after 3 strikes, it goes to 1 out.. after 3 outs all leds are cleared, after 4 balls all leds are cleared.

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by foxstar View Post
    Think of a 4 by 6 foot tic-tac-toe board. the center plate is the strike zone, all the outer plates are the balls zones. Each plate floats on springs and when hit, pushes on a switch. after 3 strikes, it goes to 1 out.. after 3 outs all leds are cleared, after 4 balls all leds are cleared.
    That sounds reasonable. I'd put multiple switches in each box, one in each corner, one in the center, 5 per box I suppose...easy enough. What happens if you get 2 boxes (or 3 or even 4 in certain cases) with one pitch?

  5. #5
    Join Date
    Apr 2007
    Location
    KC MO
    Posts
    7


    Did you find this post helpful? Yes | No

    Default

    At this level, I just have two inputs, all ball hits are tie to one lead and the strike zone is lead #2. in the code I test for strikes first then balls. So strikes win in most cases. the layout is very basic. I'm looking for help on the circuit layout. Something very basic, just to prove it works.

  6. #6
    Join Date
    Apr 2007
    Location
    KC MO
    Posts
    7


    Did you find this post helpful? Yes | No

    Default

    I have tried to test this code and I can not get either of the switches RA.3 or RC.3 to fire off. Dose anyone know why? Are the registers set correctly?

Similar Threads

  1. HARDWARE I2C SAMPLE CODE question
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 21:07
  2. How much code space do PBP statements use.
    By Darrel Taylor in forum Code Examples
    Replies: 5
    Last Post: - 13th February 2009, 21:31
  3. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  4. MN1307 sample code problem
    By ngeronikolos in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 20th November 2008, 20:41
  5. 18F8722 sample code
    By George in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 19th June 2008, 13:42

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts