Shop OBEX P1 Docs P2 Docs Learn Events
LCD display and BoeBot — Parallax Forums

LCD display and BoeBot

EduardEduard Posts: 21
edited 2008-12-09 14:58 in BASIC Stamp
Hi!

I want to put a LCD display into my BoeBot.

I've three push-buttons connected to my BoeBot. I would like to create a "pulse counter" with an LCD.

I've 3 push-buttons, called A, B, and C.
I would like that the LCD shows this:

A has been pushed: 0
B has been pushed: 0
C has been pushed: 0




If I push A and C :

A has been pushed: 1
B has been pushed: 0
C has been pushed: 1




If I push B and C:

A has been pushed: 1
B has been pushed: 1
C has been pushed: 2




...... (and always the same) .......

I would like to create a push counter.

It's possible with a 2 lines Parallax LCD ( http://www.parallax.com/Store/Accessories/Displays/tabid/159/CategoryID/34/List/0/Level/a/ProductID/52/Default.aspx?SortField=ProductName,ProductName ), so the text will have to scroll ¿?

Sorry if my English isn't very good.

Regards from Barcelona!

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-12-09 00:19
    You could certainly scroll the display, but your program would have to do the work. The display won't do it for you. I strongly suggest putting the 3 pieces of information on one line and perhaps keeping the 2nd line free for other information. Something as simple as "A:xx B:xx C:xx" which occupies 14 columns in a single row. A SEROUT statement like

    SEROUT <pin>,<Baud>,[noparse][[/noparse]"A:",dec2 Acnt, " B:",dec2 Bcnt, " C:",dec2 Ccnt]

    would display the count information for A, B, and C. You'll need additional characters at the beginning of the SEROUT to instruct the display to position to the first row and first column. I don't have that information handy, but it's in the documentation and examples for the display. Acnt, Bcnt, and Ccnt are byte variables where you keep a count of the number of times the button is pressed. If you haven't already, download and read the "What's a Microcontroller?" tutorial (which is also available in Spanish). It'll show you examples for connecting and sensing push button pushes.
  • EduardEduard Posts: 21
    edited 2008-12-09 14:58
    Thanks!!

    I'll buy the LCD and putting the information in the way that you've told me.

    Thanks again, Mike!.
Sign In or Register to comment.