Serial Question
Forgive my lack of experience. I'm looking for examples of sending serial
data to the BSII in the form of pakets or data streams. What I want to
acomplish for starters is send from my pc a command to the stam to move a
motor left or right based on a Decimal number from 0 to 160 80 being center.
Anyway I want to develop code to look something like this fist number is the
Command type - say 1 to move motor, 2- to sample tempature, 3 - test for
light. After the first number would follow the second part. example 1,80
which would mean 1-move motor to center, or 2,5000 which means sample temp
for 5 secs., and so on. As I mentioned before, I'm loking for program
examples to implement this type of serial communications. Hope someone can
help. I appriciate any posts give. Thanks.
Shawn
Original Message
From: "Michael Picco" <mpicco@j...>
To: <basicstamps@egroups.com>
Sent: Monday, September 11, 2000 2:07 PM
Subject: Re: [noparse][[/noparse]basicstamps] WAV files played with Stamp?
> My plan, for starters, would be to play 8-bit samples and graduate up, if
possible.
>
> Nicolas Fournel wrote:
>
> > Hi everbody,
> >
> > Actually, the .WAV files can be compressed with A-law, mu-law and a lot
of other things. But the common files you will find are indeed uncompressed.
The frequency informatoin is stored in bytes 24 and 25 (starting from byte
0).
> >
> > Don't hesitate to contact me for further info on sound file formats,
it's part of my job. :-)
> > By the way , what do you plan to play back: 8-bit or 16-bit samples?
> >
> > Nicolas
>
>
>
>
data to the BSII in the form of pakets or data streams. What I want to
acomplish for starters is send from my pc a command to the stam to move a
motor left or right based on a Decimal number from 0 to 160 80 being center.
Anyway I want to develop code to look something like this fist number is the
Command type - say 1 to move motor, 2- to sample tempature, 3 - test for
light. After the first number would follow the second part. example 1,80
which would mean 1-move motor to center, or 2,5000 which means sample temp
for 5 secs., and so on. As I mentioned before, I'm loking for program
examples to implement this type of serial communications. Hope someone can
help. I appriciate any posts give. Thanks.
Shawn
Original Message
From: "Michael Picco" <mpicco@j...>
To: <basicstamps@egroups.com>
Sent: Monday, September 11, 2000 2:07 PM
Subject: Re: [noparse][[/noparse]basicstamps] WAV files played with Stamp?
> My plan, for starters, would be to play 8-bit samples and graduate up, if
possible.
>
> Nicolas Fournel wrote:
>
> > Hi everbody,
> >
> > Actually, the .WAV files can be compressed with A-law, mu-law and a lot
of other things. But the common files you will find are indeed uncompressed.
The frequency informatoin is stored in bytes 24 and 25 (starting from byte
0).
> >
> > Don't hesitate to contact me for further info on sound file formats,
it's part of my job. :-)
> > By the way , what do you plan to play back: 8-bit or 16-bit samples?
> >
> > Nicolas
>
>
>
>
Comments
LCD display I'm using is a Scott Edwards 2x16 Serial LCD.
I have been able to send text with no problem. Problem I'm
having is I want to send the status of a pin to the LCD.
I have done this before with the Debug command with no problem.
This is the first with the serial out command.
Help Please
like:
serout pin,baud,[noparse][[/noparse]"PIN110 = ", bin IN10]
Do the same as you would a debug, but what you would debug out goes
into the brackets.
(ok, never really done this, so just a good guess)
-Martin Hebel
http://www.selmaware.com
http://www.siu.edu/~imsasa/elm
--- In basicstamps@egroups.com, "Gene Shults" <gshults@o...> wrote:
> I'm wanting to send Pin status to a LCD display.
> LCD display I'm using is a Scott Edwards 2x16 Serial LCD.
> I have been able to send text with no problem. Problem I'm
> having is I want to send the status of a pin to the LCD.
> I have done this before with the Debug command with no problem.
> This is the first with the serial out command.
>
> Help Please
I have shearched the Stamp manual for the (bin) statement and can't
find it. I assume that the IN10 stands for input pin 10. The manual
isn't very clear on these commands. Is there any good books out
there that dicribes the commands better than the Stamp Manual???
--- In basicstamps@egroups.com, "Martin Hebel" <martin@s...> wrote:
> To send the status, it shouldn't any more difficult than something
> like:
>
> serout pin,baud,[noparse][[/noparse]"PIN110 = ", bin IN10]
>
> Do the same as you would a debug, but what you would debug out goes
> into the brackets.
>
> (ok, never really done this, so just a good guess)
> -Martin Hebel
>
> http://www.selmaware.com
> http://www.siu.edu/~imsasa/elm
>
> --- In basicstamps@egroups.com, "Gene Shults" <gshults@o...> wrote:
> > I'm wanting to send Pin status to a LCD display.
> > LCD display I'm using is a Scott Edwards 2x16 Serial LCD.
> > I have been able to send text with no problem. Problem I'm
> > having is I want to send the status of a pin to the LCD.
> > I have done this before with the Debug command with no problem.
> > This is the first with the serial out command.
> >
> > Help Please
Hi Gene -
>This still isn't real clear to me.
>I have shearched the Stamp manual for the (bin) statement and can't find it.
>Check Page 326, Table I-7 for details on the BIN MODIFIER.
>I assume that the IN10 stands for input pin 10. The manual
>isn't very clear on these commands. Is there any good books out there
>that dicribes the commands better than the Stamp Manual???
Neither are commands, per se. The first is a modifier which can be used
WITHIN a command, and the second is a variable name or and operation,
depending on how it is used. "PIN10" as shown in Martin's example, is
nothing more than a ASCII literal. It has NO FUNCTION !
It takes some time to get used to the syntax, and the best teacher is found
in the Editor/Interpreter. Use it, write sample code, have it compile the
code, and when you feel comfortable with the SYNTAX, THEN go ahead and
attempt operational programs.
First we must crawl before we walk, and walk before we run. To start out
running - invariably we will stumble. So - we get up, and try again. That
called a learning curve, and there isn't much way around it, unfortunately.
Reading this list is also helpful, NOT just when one has a problem. There
is a wealth of information which will pass before your eyes, on a daily basis.
Hope that permits you to realize that others have come this way before, and
succeeded. You can too ! Just give it some time.
Regards,
Bruce Bates
>--- In basicstamps@egroups.com, "Martin Hebel" <martin@s...> wrote:
> > To send the status, it shouldn't any more difficult than something
> > like:
> >
> > serout pin,baud,[noparse][[/noparse]"PIN110 = ", bin IN10]
> >
> > Do the same as you would a debug, but what you would debug out goes
> > into the brackets.
> >
> > (ok, never really done this, so just a good guess)
> > -Martin Hebel
> >
> > http://www.selmaware.com
> > http://www.siu.edu/~imsasa/elm
> >
> > --- In basicstamps@egroups.com, "Gene Shults" <gshults@o...> wrote:
> > > I'm wanting to send Pin status to a LCD display.
> > > LCD display I'm using is a Scott Edwards 2x16 Serial LCD.
> > > I have been able to send text with no problem. Problem I'm
> > > having is I want to send the status of a pin to the LCD.
> > > I have done this before with the Debug command with no problem.
> > > This is the first with the serial out command.
> > >
> > > Help Please
from your PC to your BS2.
I want to send a small text file from my PC to my BS2 and save
that text file to my eeprom of my BS2.
Any help would be great!!!
Thanks..
oneuptick@email.com writes:
from your PC to your BS2.
··I want to send a small text file from my PC to my BS2 and save
that text file to my eeprom of my BS2.
Any help would be great!!!
In the StampWorks experiments there is a project that shows how to use a
terminal (or DEBUG window) to modify text that is stored in the Stamp's
EEPROM. ·This works because the Stamp is fast enough to deal with a human
typing characters.
If you're going to do it automatically, one possible way to do it would be to
have your PC program send one character at a time with a delay between them.
The delay will give the Stamp time to receive the char, write it to EE and
then go back to the SERIN statement to wait for the next character. ·You'll
need to define an end character so the Stamp knows when to break out of the
receive loop.
The project is called POLLSTMP.BS2 and can be downloaded (with the other
experiments) from the StampWorks page at Parallax.
-- Jon Williams
-- Dallas, TX[/font]