Shop OBEX P1 Docs P2 Docs Learn Events
BS2 application in art — Parallax Forums

BS2 application in art

MFC39MFC39 Posts: 1
edited 2009-05-14 21:41 in BASIC Stamp
I'm trying to figure out the best way to interface a ultrasonic ranger with my computer so an onscreen·image will change based on range.· Any ideas on what program·I need?· Anybody do this before?
Thanks,
MFC39

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-05-14 21:41
    Start with the sample programs for the PING))). It's always a good idea to start with something that works and modify it for your needs.

    The easiest way to communicate the range information from the PING))) to a PC is to use the DEBUG statement in Stamp Basic. The data is sent over the serial port used for programming the Stamp. You can use the debug window of the Stamp Editor to see what's being sent and change your Stamp program as needed to get it to send the information you need in the format you need.

    On the PC side, whatever program you're using to display the image will have to respond to information received over a standard serial port (the port connected to the Stamp and used for programming). I don't know how you'd do this under Windows. I know that on a Mac, I'd have an AppleScript program that tries to read from the serial port, recovers if there's nothing received, interprets the data received (like an image name) and sends a script command to iPhoto to display the image, then repeats the process.
Sign In or Register to comment.