Shop OBEX P1 Docs P2 Docs Learn Events
LCD AppMod HELP — Parallax Forums

LCD AppMod HELP

NewAgeServerNewAgeServer Posts: 18
edited 2007-12-26 15:06 in BASIC Stamp
I need help with the LCD AppMod.

Can somebody make me a source code that monitors each button and goes to a separate subroutine for a button that is pressed? Tell it to do nothing if two buttons are pressed at the same time.

I want the subroutines to be:

Button1
Button2
Button3
Button4

Button 1 is the leftmost button and button 4 is the rightmost button.

I do want to use the LCD...

Thanks

Comments

  • NewAgeServerNewAgeServer Posts: 18
    edited 2007-12-25 22:14
    I forgot to mention- I'd like it in PBASIC 2.5 for the BS2
  • NewAgeServerNewAgeServer Posts: 18
    edited 2007-12-26 01:18
    Anyone?
  • sylvie369sylvie369 Posts: 1,622
    edited 2007-12-26 02:21
    Be patient - it's Christmas Day, you know.
  • FranklinFranklin Posts: 4,747
    edited 2007-12-26 02:46
    What help do you need? Writing you a program isn't help, it's work.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • NewAgeServerNewAgeServer Posts: 18
    edited 2007-12-26 03:59
    Ok... Then how would I code what I described?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I'm not new at basic stamp, but i am new at the LCD AppMod
  • FranklinFranklin Posts: 4,747
    edited 2007-12-26 04:06
    Start here www.parallax.com/Portals/0/Downloads/docs/prod/appmod/29121-LcdAppMod-v1.1.pdf then if you have specific questions ask back here.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • NewAgeServerNewAgeServer Posts: 18
    edited 2007-12-26 14:41
    I looked at that and it confused me... I just want to know how to do it!!!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I'm not new at basic stamp, but i am new at the LCD AppMod
  • Oper8r AlOper8r Al Posts: 98
    edited 2007-12-26 14:54
    Did you try the demo code in the PDF Franklin linked to? It should give you what you need to read the buttons and then go to a subroutine or at least be able to ask more specific questions. I·doubt that·anyone is just going to write the program for you.
  • NewAgeServerNewAgeServer Posts: 18
    edited 2007-12-26 15:06
    WAIT!!! Thanks to the source code for Crustcrawler Robotics' Hexcrawler, I have figured out how to do it where it does an IF...THEN statement!!!
    
    ' Special thanks to Crust Crawler Robotics for allowing free access to it's Hex Crawler manual to FINALLY figure this out! :)
    DO
      GOSUB LCD_Get_Buttons                         ' Go check for buttons pressed
      IF btnA = 1 THEN                              ' If BtnA (leftmost button) is pressed, then...
        HIGH 13                                     ' Turn on a green LED on P13
      ENDIF
    LOOP
    
    


    Here is the subroutine

    LCD_Get_Buttons:
      LcdDirs = %0000                               ' make LCD bus inputs
      buttons = %1111                               ' assume all pressed
      FOR scan = 1 TO 10
        buttons = buttons & LcdBusIn                ' make sure button held
        PAUSE 5                                     ' debounce 10 x 5 ms
      NEXT
      LcdDirs = %1111                               ' return bus to outputs
      RETURN
    
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I'm not new at basic stamp, but i am new at the LCD AppMod
Sign In or Register to comment.