Use PC keyboard keys as momentary switches for Arm DC motors
kleekru
Posts: 32
Is there a way to do this? I'm currently using a menu in the PBasic debug terminal to drive the motors in the OWI arm trainer. However, with this programming, I'm only able to drive the motor for the length of a pause value. I would rather use keyboard keys as momentary switches that drive the motors only when the key is pressed down. Does anyone have any suggestions for doing this? If it is helpful, I can post the code I have that uses the menu approach.
Also, I'm hoping to control the arm from a web page. I know I'll need to create a serial connection to the Basic stamp and use a php page to reference the connection... A suggestion for how to link from a php page to the basic stamp would be great especially using a USB connection. I think I'm asking for a lot... so any small amount of guidance is appreciated.
Also, I'm hoping to control the arm from a web page. I know I'll need to create a serial connection to the Basic stamp and use a php page to reference the connection... A suggestion for how to link from a php page to the basic stamp would be great especially using a USB connection. I think I'm asking for a lot... so any small amount of guidance is appreciated.
Comments
$25 is a good deal: http://www.amazon.com/gp/product/B0028MBWS2/ref=pd_lpo_k2_dp_sr_2?pf_rd_p=486539851&pf_rd_s=lpo-top-stripe-1&pf_rd_t=201&pf_rd_i=B001AF7M8W&pf_rd_m=ATVPDKIKX0DER&pf_rd_r=1E22B17YNBB1GGQTXQM8
Buy something else for a buck and get free shipping.
Or stay tuned to my servo robot arm updates, I can control that with a PS2 keyboard directly, no PC required.
Download Visaul Basic express (is free) then follow this link:
http://forums.parallax.com/entry.php?423-VB-Express-2010-to-Basic-Stamp-2-Serial-Communication
Once you understand how to create a form that communicate with the stamp then use Keypress to do what you need.
Luis