Shop OBEX P1 Docs P2 Docs Learn Events
keyboard instead of pushbutton — Parallax Forums

keyboard instead of pushbutton

jc3IIIjc3III Posts: 21
edited 2011-04-14 22:16 in BASIC Stamp
i know how to use the pushbutton, but I want to use the pc keyboard instead of the pushbutton. For example if I hit the "L" button then it will activate a pin. just like the pushbutton does. Can you give an example

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-04-14 10:00
    It sounds like you need to use the DEBUGIN statement to read a character from the PC (Stamp Editor's Debug Window). Read the chapter in the Stamp Manual on the DEBUGIN statement and look at the examples there. You can find the same information in the Stamp Editor's help files.
  • jc3IIIjc3III Posts: 21
    edited 2011-04-14 22:01
    I see how to do the program wit the keyboard instead of the pushbutton, but how can I make it increment by 1 each time I push the number.
  • Mike GreenMike Green Posts: 23,101
    edited 2011-04-14 22:16
    Your program has to do a DEBUGIN over and over again. Each time it receives a character, your program has to decide what to do based on the character value. One of the things could be to increment some variable, maybe each time you press the "+" key for example.

    If you don't understand, maybe you need to work through the various examples and exercises in the "What's a Microcontroller?" tutorial. This is included as part of the help files for the Stamp Editor and can be downloaded from Parallax's Download webpage.
Sign In or Register to comment.