Shop OBEX P1 Docs P2 Docs Learn Events
New and have some questions — Parallax Forums

New and have some questions

dphensdphens Posts: 10
edited 2011-04-08 12:55 in General Discussion
Hi all!

I stumbled across the BASIC stamp kit in a Radio Shack and having always been interested in electronics, I picked it up. Doing so has opened the door to a whole slew of questions. However, I am currently not knowlegdeable enough to even know the right way to ask those questions! :lol:

But, since I've got to start somewhere, here goes...

It seems from what I've already read and done with the kit, that I can use something like this to interface with my computer. Assuming this is true, what pathways are available to use for this communication? Serial, TCP, UDP? Others?

For example, let's say I have a computer program that can send out various data through a TCP port (address). Can the BASIC or Propeller devices capture that data and use it? So maybe I want the computer to send a command to turn an LED on and off or to move a motor. Are these possible?

Sorry if my questions aren't clear. I am just trying to understand what's possible and what is not with these type of devices.

Thanks!

Comments

  • ElectricAyeElectricAye Posts: 4,561
    edited 2011-04-07 11:26
    dphens wrote: »
    .... So maybe I want the computer to send a command to turn an LED on and off or to move a motor. Are these possible?

    ....

    Welcome to the forums!

    For the Propeller, the quick answer is definitely yes!

    For example, check out the PC terminal communications and PE Kit funlabs material on this page:

    http://forums.parallax.com/showthread.php?89958-Propeller-Education-Kit-Labs-Tools-and-Applications

    There are many ways to have your computer talk to these chips and vice versa. The Propeller can also stand alone as a kind of mini-computer, complete with SD card, VGA or TV display, keyboard, mouse control, you name it.

    I'm not so familiar with the Basic Stamp, so I'll leave someone else to talk about that.

    Tell us more about what you want to do and people here can help you out.

    Enjoy!
  • Mike GreenMike Green Posts: 23,101
    edited 2011-04-07 12:39
    The Propeller can certainly talk to a PC via serial and Ethernet. Look at the description of the Spinneret, a Parallax Propeller board with an Ethernet interface. It can act as a webserver or a simple Basic interpreter via Telnet, etc. There's also the YBox2 which is an older, simpler product made by Adafruit.

    The Basic Stamp is slower and more limited in memory than the Propeller. It can't handle Ethernet by itself, but can be used with something like the PINK which is a separate webserver that the Stamp can control and access string variables that can be incorporated into the webpages and changed by the web browser. This was originally a Parallax product, but is a special version of a Netburner product, now sold by Netburner.

    Any of these solutions can be used to control LEDs or servos from your PC. Both the Propeller and the Basic Stamp can talk to the PC over a standard serial port and both the Propeller and Basic Stamp come in USB versions where a USB to serial adapter is included for use with a PC without a hardware serial port.
  • PliersPliers Posts: 280
    edited 2011-04-07 13:08
    To answer your question about using a serial link to control your stamp, the answer is yes.
    I'm not a stamp user myself, but you will find all the information you need here in the forums.
    If you bought a stamp module already, go ahead and explore/learn with it.

    Later, you will be wanting to go with Parallaxes' Propeller system.
  • dphensdphens Posts: 10
    edited 2011-04-07 18:30
    Thank you all very much for the replies!! This is very encouraging! :smile:

    Basically my project involves building controls and indicators that will interface with PC flight simulation software. There are several solutions out there built for this, but either the cost is extremely high or the configuration is complex or both. When I found the Basic Stamp and saw what it could do, I started reading the Parallax website and even at my level of knowledge (practically none :lol:), it seemed that it was possible to do what I want to do.

    The ultimate goal is to have an interface that will exchange data with the simulation. It will send signals whenever a button is pressed or a switch is toggled. It would receive signals whenever the simulation needed to turn a LED on or off. I would be using toggles, pushbuttons, and rotary encoders for the inputs. Eventually, I would like to add working guages that would use servos, but that will happen at a much later stage.

    My current understanding (and this is another area I am new at and trying to learn more) is that the simulation sends data to a TCP port. For sending data to the simulation, the easy route is to just assign keyboard commands to any inputs (i.e. flip a switch and the interface sends a "ctrl g" key combination). The simulation uses the LUA scripting, so it's my belief that I should be able to also send commands through LUA that are not assigned to a keyboard command - if I'm correct, that means creating a variable that is sent to the TCP port.

    Here again, I am just in early stages of learning how this all works, but at least it's sounding like most, if not all, that I want to do is possible.

    Sorry to ramble on, I'm just a little excited about the possibilities in this!
  • P!-RoP!-Ro Posts: 1,189
    edited 2011-04-08 12:55
    In order to communicate via usb to a program on the computer would be a very difficult task considering you would need to figure out how the external attachments normally communicate with the program and you would have to emulate it. However, sending keyboard commands to the computer shouldn't be all to difficult. The propeller can already read a keyboard just fine so if you changed that code I suppose you could easily get it to instead output the commands to the computer. I'm not sure how you would do the same with the Basic Stamp, however. You may have to edit an old keyboard and attach the stamp pins to the desired keys, but this certainly won't get you many keyboard options.
Sign In or Register to comment.