Shop OBEX P1 Docs P2 Docs Learn Events
BS2 — Parallax Forums

BS2

Jimi FreemanJimi Freeman Posts: 46
edited 2009-08-30 14:34 in BASIC Stamp
Does the BS2 PBasic provide network capabilities, like raw sockets? What I want to do, is use my PING sensor to measure the distance of an object, and if it gets to a certain point, send an email. The board will be connected to the ttyUSB0 port of my linux machine. I would prefer if the board would make the actual socket to my postfix mail server, if not, I guess I can do it with perl, and listen to the /dev/ttyUSB0 , and parse the output and have perl send the email, however, I would rather not.

Also, it seems the PBasic program for linux does not support 2.5 ?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-08-30 14:10
    The BS2 has no Internet capabilities. For that you need some additional hardware that completely manages the network connection. The PINK (www.parallax.com/StoreSearchResults/tabid/768/txtSearch/pink/List/0/SortField/4/ProductID/40/Default.aspx) is one such device that mostly acts as a webserver to the network, but can send e-mail and UDP messages. The BS2 interfaces to the PINK via a direct serial connection.

    If you need more in the way of network communications, consider using the Propeller. The YBox2 (www.ladyada.net/make/ybox2/) is a Propeller with an Ethernet interface and video (TV) output that can do Telnet, serve web pages, and even read short mail messages from a POP server. You can download programs to it via the network and there is a fine Spin compiler / downloader that runs under Linux.

    Post Edited (Mike Green) : 8/30/2009 2:23:17 PM GMT
  • Jimi FreemanJimi Freeman Posts: 46
    edited 2009-08-30 14:19
    Thanks,
    Do you know if the Linux PBasic compiler will ever have 2.5 support? Most of the sample apps etc do not compile because of the 2.5 directive, and removing it causes tons of other errors.
  • Mike GreenMike Green Posts: 23,101
    edited 2009-08-30 14:28
    Make sure you've got a current version of the Stamp "tokenizer" from Parallax's website. There is a version for Linux.

    The "tokenizer" is really the PBasic compiler and the current version should be able to handle 2.5. It may be that the PBasic IDEs for Linux don't include the current version. I don't really know.

    Download the tokenizer via the link at the bottom of the Stamp Software Downloads page where the Linux software is listed.
  • Jimi FreemanJimi Freeman Posts: 46
    edited 2009-08-30 14:34
    Mike, you are a genious, if I wasn't poor, I'd tip you! That was the answer =)
Sign In or Register to comment.