Shop OBEX P1 Docs P2 Docs Learn Events
BASICSTAMP send key press ENTER(keyboard) — Parallax Forums

BASICSTAMP send key press ENTER(keyboard)

j4nk3rj4nk3r Posts: 6
edited 2007-10-23 14:33 in BASIC Stamp
Can·BASICSTAMP send a command key press ENTER (keyboard) to a computer. ? Like barcode reader that can send ENTER key press if detect barcode.

Thanks

Comments

  • Steve JoblinSteve Joblin Posts: 784
    edited 2007-10-22 01:12
    You can send any ascii value from a Stamp to a PC using the SEROUT command.
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2007-10-22 01:15
    Not directly, it requires an application on the PC to accept the data and use it as keystrokes.· StampPlot Pro has that ability - see the help files:
    http://www.selmaware.com/stampPlot_v3/ext_apps.htm
    From the BASIC Stamp you can start an application and then send data to it
    [color=black]DEBUG "!APPE c:\program files\microsoft office\office\excel.exe",CR[/color]
    [color=#000000]PAUSE 5000[/color]
    [color=#000000]FOR X = 0 to 500[/color]
    [color=black]  DEBUG "!APPS(RTIME){TAB}", DEC x,"{ENTER}",CR[/color]
    [color=#000000]  Pause 100[/color]
    [color=#000000]Next[/color]
    
    

    At times I used·it 'cheat' with some on-line games that had very repetative key strokes - hold a button on my BS2 board and have it send the·key·sequence [noparse]:)[/noparse]

    -Martin


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    StampPlot - GUI and Plotting Software
    Southern Illinois University Carbondale, Electronic Systems Technologies
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2007-10-22 01:17
    Maybe I'm mistaken, but you need that data to go to a specific application that would normally want keyboard input?· That's what my response was focused on.
  • j4nk3rj4nk3r Posts: 6
    edited 2007-10-22 03:32
    Thanks for replay

    But i not get answer until now.

    In my project i want that BASICSTAMP have detect sensor and basicstamp send key pressed to PC(computer) to do something.This key pressed has function to do something Like Ctrl+O(keyboard) on internet explorer to open File and so on or like barcode reader that detect barcode.
  • Mike GreenMike Green Posts: 23,101
    edited 2007-10-22 04:45
    It sounds like you want the Stamp to take the place of a keyboard. I don't recall anyone posting an example of this, but I could be wrong.
    Here's an article on the PS/2 protocol and the connections required (in general): www.computer-engineering.org/ps2protocol/.
    The Stamp is capable of generating the synchronous data stream using the SHIFTOUT statement. You'll need some external circuitry to provide
    for the open-collector connection and you'll need to write your own "driver" to handle the communication between the PC and the Stamp, but it should be doable.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-10-23 14:33
    In the past a customer has proven that, while the BASIC Stamp cannot receive PS/2 or AT keyboard data it can send them. I don't know if this will help in our application or not.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.