Shop OBEX P1 Docs P2 Docs Learn Events
How to set VAR externally, then WRITE it — Parallax Forums

How to set VAR externally, then WRITE it

T ChapT Chap Posts: 4,223
edited 2006-06-17 23:16 in BASIC Stamp
I want to be able to take a number of pulses to be sent to a stepper/timing belt, convert that number of pulses to inches with 2 decimal places on an LCD, i.e. 40,000 pulses will read 34.35 inches on the display. I want to adjust the number, say from 34.35 to 32.75 on the display, using either a keypad to type in the numbers, or scroling up/down while holding up/down buttons, so the thing scrolls faster as you hold it longer. After entering in the new "destination" in inches, I want to write it to eeprom, so the PositionX can read that WORD and go to it when called. I want to be able to scroll through at least 8 positions, enter the inches(pulses), press "save", then scroll to the next position, change, save. This is a one time situation to get the positions right, then interface with display, buttons or keypad, can be removed.

Is this doable? If so, how best to it and what is easier? Keypad or Up/Dn? After that, would it be using a serial LCD, so that the number of pulses an change in real time as the Up/Dn is scrolled, assuming that method. A keypad wuld be preferred, simple cursor to the number, retype it, press save, then maye "are you sure you want to save?"

If somebody could just point me in the right direction That would be great.

Comments

  • T ChapT Chap Posts: 4,223
    edited 2006-06-16 22:04
    Ok to clarify, here is what I want the LCD to display, and there should have a button to toggle to the next position(maybe left/right button). What I am asking is... is if this is possible, and what LCD/keypad to use with BS2P40, and where to start digging for examples if anyone has run across this before.

    (Screen shot 1 is i.e. Position 1 of 8) each screenshot will display SPEED, Inches relative to 0(HOME) with .00 decinal places

    1 Position1 fixed in software, only for user to know where they are
    Speed = "X" IPS where X can be a cursor location, inches per sec then can be re-written with keypad
    Desitination = "33.33" where 33.33 is a number of real pulses with a formula to derive inches, using cursor

    Press a save button, then scroll to any other position



    Up

    Left Right

    Down


    7 8 9
    4 5 6
    1 2 3
    * 0 #

    Save

    Thanks for any tips!
  • RinksCustomsRinksCustoms Posts: 531
    edited 2006-06-17 23:16
    sounds like an awesome idea for my milling machine as a primitive cnc control. Im currently working on something a bit more permanent for changing settings of digital POT's in an audio proccesor/light organ idea, (and having similar issues with setting variables externally via a touch screen switch from mouser.com)


    your going to be using a fair amount of "BUTTON" comands which i havent had too much luck with.
Sign In or Register to comment.