Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 17
Hey crew, I was wondering if anyone could help me with their knowledge. I have used and programmed the Stamp via windows with software I downloaded at Parallax's site . ...
  1. #1
    Just Joined! Lich's Avatar
    Join Date
    Feb 2008
    Posts
    30

    BASIC Stamp Microcontroller



    Hey crew,

    I was wondering if anyone could help me with their knowledge.

    I have used and programmed the Stamp via windows with software I downloaded at Parallax's site. What I'm trying to do though, is put together the software to program the stamp on Ubuntu 7.10, and I could use a little help. How do I go about setting up the software?

    Additionally, I was wondering why the system doesn't recognize the Stamp when I plug it into the USB port. (The stamp's lead is serial, but is converted to USB physically via an adapter). Is there something I need to do to mount this device?

    Let me know please. Thank you in advance.

  2. #2
    Just Joined! Lich's Avatar
    Join Date
    Feb 2008
    Posts
    30
    Well, here's the update on this. I want you to know I am making an effort here, and not looking for anyone to waste their time on me for no reason...

    I've downloaded the tokenizer and the source code from Source Forge. I've extracted and compiled the program by using the 'make' command within the directory I extracted. I've installed it using 'make install'.

    Now is where I get into some question. The Basic Stamp Tools for Linux website explains that I need to create a symbolic link inside my /dev directory that points to the serial port where the stamp will be connected, by doing:

    cd /dev
    ln -s ttyS# bstamp

    What number do I insert there in place of the # sign. Serial ports are normally COM1, 2, 3, or 4, right? Does it make a difference then what I assign to it?

    As it stands, I gave it COM1, which is ttyS0.

    In any case, I then used SCiText to write the PBASIC program and save it as programname.bs2. When I attempted to tokenize it, I received this error:

    PBASIC Tokenizer Library version 1.16

    Error: Tokenization of Wiper.bs2 failed.
    Failed compile: 156-Unknown target module. $STAMP directive not found
    The following text gave the error:



    Anyone have any ideas?

  3. #3
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    Serial ports are normally COM1, 2, 3, or 4, right?
    Yes. /dev/ttyS0, 1, 2, and 3.
    Does it make a difference then what I assign to it?
    Yes, indeedy.

    At least with my (old) Slackware, ttyS0 is traditionally the serial port on the back of the box, and ttyS1 is traditionally any internal modem you might have. (Remember those days?)

    Maybe you're not running Slackware. Please tell us the distribution you're using, and if there's anyone out there who uses that distribution and is ancient enough to use, or have used, serial ports with that distribution, you'll get a better answer than mine.
    Error: Tokenization of Wiper.bs2 failed.
    Failed compile: 156-Unknown target module. $STAMP directive not found
    Haven't a clue. Even if you're somewhat familiar with PBasic, if nobody here comes up with an answer (or even if someone does), you may wish to google this:
    Code:
    PBasic tutorial
    I did, and came up with some useful-looking search results.

    Hope this helps.
    --
    Bill

    Old age and treachery will overcome youth and skill.

  4. #4
    Just Joined! Lich's Avatar
    Join Date
    Feb 2008
    Posts
    30
    Thank you for replying.

    This morning, I got a little further. Instead of tokenizing the code through the terminal, I just saved the code as programname.tok right from SCiText. I may run into issues with that later, but for now it gets me past that point so I can at least see if I'm communicating with the Stamp... which I am not...

    When I attempted to run a sample program (the name of it is Wiper.tok), I put in:

    bstamp_run Wiper.tok

    The output message was:

    Error: Could not open /dev/bstamp for reading/writing!


    I'm using Ubuntu Linux 7.10 and the stamp actually plugs into a USB port via a serial to USB adapter. I don't even have a serial port on this laptop. I'm sorry, I should have mentioned that. Under windows, when I've run Stamp, it's always recognized it as COM1.

  5. #5
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    What do you get when you say this?
    Code:
    ls -l /dev/ttyS0
    If you're not running your program as root, you might find that you don't have both read and write permissions for that device. If that's the case, then this (as root) should fix it so you can run your program non-root:
    Code:
    chmod 666 /dev/ttyS0
    --
    Bill

    Old age and treachery will overcome youth and skill.

  6. #6
    Just Joined! Lich's Avatar
    Join Date
    Feb 2008
    Posts
    30
    I have changed the permissions on /dev/ttyS0 as you said, as well as on /dev/usb1, to 666.

    I then navigate to the directory of bstamp and say:

    sudo bstamp_run Wiper.tok
    Wiper.tok is in the bstamp directory.

    The output is:

    Error: No BASIC Stamp identified!
    Probably the stamp isn't connected, perhaps your stamp version isn't supported?
    Try looking at the help, try 'bstamp_run -h' for more information.

    I guess the hang-up here is why am am unable to communicate with my Stamp.


    By the way, thank you for your time so far. I really appreciate this.

  7. #7
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    thank you for your time so far. I really appreciate this.
    No problem. I wish I could help you further, but this now sounds like a STAMP issue, and I have no experience with that. (Nor, evidently, does anyone else here.)

    I could urge you to read every inch of the documentation that came with it, but I'm assuming you've already done that.

    On the off chance that you didn't get all the official documentation, I could urge you to visit here, but you've probably done that too.

    The only final thing I can suggest is that you google
    Code:
    stamp tutorial
    You'll get lots of irrelevant search results, but a couple of goodies like this and this.

    Good luck!
    --
    Bill

    Old age and treachery will overcome youth and skill.

  8. #8
    Just Joined! Lich's Avatar
    Join Date
    Feb 2008
    Posts
    30
    Some of this is redundant, but here's as far as things have gone. I posted this on Parallax's website:

    Hello everyone,

    I'm having a little difficulty using the Stamp under Ubuntu Linux 7.10.

    Let me tell you what I have done so far, and where my resources came from. I hope someone here is able and gracious enough to assist me.

    First of all, I downloaded the bstamp-2006.05.31.tar.gz file from sourceforge. I also downloaded tokenizer.so.

    So the first question is, is this all I need?

    Moving on, I extracted the .tar.gz package, which created a directory named bstamp on my desktop. Using terminal and navigating to this directory, I typed;

    make

    and then;

    sudo make install


    The next thing I did was to create a link from both ttyUSB0 and usb1 to bstamp. I did this via the terminal like this (after navigating to the /dev directory;

    ln -s ttyUSB0 bstamp

    ln -s usb1 bstamp -after hitting enter after this line, the message "file exists" came up.

    Then I copied the tokenizer.so to /usr/local/lib/libbstamptokenizer.so

    In terminal I ran bstamp_tokenize which must have been a success I guess, because in the terminal "PBasic Tokenizer Library version 1.23" come up and I can begin typing....

    Next question, what the heck do I do from here?



    I was shotgunning it and tried piping it based on what I read at sourceforge. Below is my input and the resultant errors:

    Quote Originally Posted by In Terminal
    mitch@mitch-laptop:~/Desktop/bstamp$ sudo cat hello.bs2 | bstamp_tokenize | bstamp_run
    PBASIC Tokenizer Library version 1.23

    Error: Could not open /dev/bstamp for reading/writing!
    cat: hello.bs2: No such file or directory
    Error: Tokenization of (null) failed.
    Failed compile: 156-Unknown target module. $STAMP directive not found
    The following text gave the error: mitch@mitch-laptop:~/Desktop/bstamp$ bstamp_tokenize

    Third question:

    Is someone available here who has good knowledge of running the stamp on Linux, who could maybe walk me through this step by step. I know a windows version would be easier and I've run stamp under windows successfully before, but I have Linux at home and have been released from college early due to taking a job in my industry of study. I need to do some stamp projects however as a condition of the release, and so it is quite important that I am able get this working...

    If anyone would / could assist me, I'd be willing to compensate you for your time.

  9. #9
    Just Joined!
    Join Date
    Dec 2008
    Posts
    1
    you need to link bstamp to the dev like ln -s /dev/ttyS0 /dev/bstamp

    as for running the stamp make your script in a text editor and run it pretty much the same way of saying cat test.bs2 | bstamp_tokenize | bstamp_run

  10. #10
    Just Joined!
    Join Date
    Jan 2009
    Posts
    1

    I might be of help if you cant get bstamp working in Linux

    Quote Originally Posted by justsawaquestioniknow View Post
    you need to link bstamp to the dev like ln -s /dev/ttyS0 /dev/bstamp

    as for running the stamp make your script in a text editor and run it pretty much the same way of saying cat test.bs2 | bstamp_tokenize | bstamp_run


    I am running SUSE 11 and could not get my bstamp to communicate until I realized that I am going through USB. So here are the commands I had to use by looking over this thread and grasping something from everyone. Not sure if anyone posted anything on this yet, but hope I can help.

    Instead of using a serial port, use a USB port. So for instance do this instead

    sudo chmod 666 /dev/ttyUSB0

    then:
    sudo rm /dev/bstamp (only do this if you already created the file)

    then:
    sudo ln -s /dev/ttyUSB0 /dev/bstamp

    this way your using a USB instead of Serial.

    do everything else like normal and compile and send. Now mine works. Hope this helps someone.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •