Shop OBEX P1 Docs P2 Docs Learn Events
Use keyboard / user input to turn on LED — Parallax Forums

Use keyboard / user input to turn on LED

gpiersongpierson Posts: 23
edited 2013-03-24 20:27 in BASIC Stamp
Hi, I'm new to this forum. And I just purchased a Boebot with Basic Stamp 2 Board of Education USB, so I'm new to it too...so please bear with me!

I'm trying to write a simple code with my 11 year old to turn on a LED with a keystroke. For example, when I have the Basic Stamp Editor up and running, can I program the Board of Education to turn on a led by simply hitting a keystroke. Then turning it off by hitting another keystroke. I realize I'd have to run this WHILE I am tethered. Is anyone able to help me with this? Or is there some other code possibly already written up somewhere?

Other thought if this isn't possible....could I program it with a 2 position joystick from parallax?

My ultimate goal is to replace the LED with a 5 volt relay to trigger another larger electronic device like a flashlight or something.

Any advice or thougts would be appreciated!

Comments

  • FranklinFranklin Posts: 4,747
    edited 2013-03-24 20:27
    Take a look at the command SERIN or it's generic cousin DEBUGIN.
Sign In or Register to comment.