programming problems
Archiver
Posts: 46,084
I just got a brand new basic stamp IIsx starter kit the other day. I have
been unsuccessful at downloading a program to it to run. I am using v. 1.04
of the software on a windows 2000 platform. I also tried the same thing on
a windows NT 4.0 platform. When I try to download a program the following
error appears:
BASIC Stamp II detected but not responding on COM1! Check Power Supply.
I have tried a brand new 9v with it, and also an AC-DC adapter that ouputs
9v DC at 600mA. Any Ideas what is going on? Thanks
--
Gerrit Padgham
gpadgham@u...
been unsuccessful at downloading a program to it to run. I am using v. 1.04
of the software on a windows 2000 platform. I also tried the same thing on
a windows NT 4.0 platform. When I try to download a program the following
error appears:
BASIC Stamp II detected but not responding on COM1! Check Power Supply.
I have tried a brand new 9v with it, and also an AC-DC adapter that ouputs
9v DC at 600mA. Any Ideas what is going on? Thanks
--
Gerrit Padgham
gpadgham@u...
Comments
Check the Parallax site, they say they have a fix for some of these issues.
Usually, programs that access Wintel hardware directly won't run on W2K or
WNT OS's - protected memory won't allow that.
DLC
Gerrit Padgham wrote:
>
> I just got a brand new basic stamp IIsx starter kit the other day. I have
> been unsuccessful at downloading a program to it to run. I am using v. 1.04
> of the software on a windows 2000 platform. I also tried the same thing on
> a windows NT 4.0 platform. When I try to download a program the following
> error appears:
>
> BASIC Stamp II detected but not responding on COM1! Check Power Supply.
>
> I have tried a brand new 9v with it, and also an AC-DC adapter that ouputs
> 9v DC at 600mA. Any Ideas what is going on? Thanks
>
> --
> Gerrit Padgham
> gpadgham@u...
--
Dennis Clark http://www.verinet.com/~dlc
dlc@v...
exactly sure what I'm looking for, or where to look. If you could be a
little more detailed I would really appreciate it. Thanks.
--
Gerrit Padgham
gpadgham@u...
Original Message
From: Dennis Clark [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=txANzelfqcQMwrSH9QSSGwReZqMLMQQKCst_u5d7xpbVg3OV7Di0KRZFaXwZpizuSXcgzvd9]dlc@v...[/url
Sent: Monday, April 10, 2000 5:55 PM
To: basicstamps@egroups.com
Subject: Re: [noparse][[/noparse]basicstamps] programming problems
Gerrit,
Check the Parallax site, they say they have a fix for some of these
issues.
Usually, programs that access Wintel hardware directly won't run on W2K or
WNT OS's - protected memory won't allow that.
DLC
Gerrit Padgham wrote:
>
> I just got a brand new basic stamp IIsx starter kit the other day. I have
> been unsuccessful at downloading a program to it to run. I am using v.
1.04
> of the software on a windows 2000 platform. I also tried the same thing
on
> a windows NT 4.0 platform. When I try to download a program the following
> error appears:
>
> BASIC Stamp II detected but not responding on COM1! Check Power Supply.
>
> I have tried a brand new 9v with it, and also an AC-DC adapter that ouputs
> 9v DC at 600mA. Any Ideas what is going on? Thanks
>
> --
> Gerrit Padgham
> gpadgham@u...
--
Dennis Clark http://www.verinet.com/~dlc
dlc@v...
I'm sorry. They used to have this note VERY prominantly displayed on
their front page, now its gone altogether! You can try sending them
email and see if they respond. They don't seem to monitor the list
anymore, where Russ or someone would have responded to you by now.
Oops.
DLC
Gerrit Padgham wrote:
>
> Thanks for your recomendation. I have looked, but honestly, I am not
> exactly sure what I'm looking for, or where to look. If you could be a
> little more detailed I would really appreciate it. Thanks.
>
> --
> Gerrit Padgham
> gpadgham@u...
>
>
Original Message
> From: Dennis Clark [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=IsOT0tInRDweUqPjxKNcThzCbZDnNATcdnNj_KzVF8SOCZMlobeqwkmR5UBEX9pjw7dt9b9_]dlc@v...[/url
> Sent: Monday, April 10, 2000 5:55 PM
> To: basicstamps@egroups.com
> Subject: Re: [noparse][[/noparse]basicstamps] programming problems
>
> Gerrit,
>
> Check the Parallax site, they say they have a fix for some of these
> issues.
> Usually, programs that access Wintel hardware directly won't run on W2K or
> WNT OS's - protected memory won't allow that.
>
> DLC
>
> Gerrit Padgham wrote:
> >
> > I just got a brand new basic stamp IIsx starter kit the other day. I have
> > been unsuccessful at downloading a program to it to run. I am using v.
> 1.04
> > of the software on a windows 2000 platform. I also tried the same thing
> on
> > a windows NT 4.0 platform. When I try to download a program the following
> > error appears:
> >
> > BASIC Stamp II detected but not responding on COM1! Check Power Supply.
> >
> > I have tried a brand new 9v with it, and also an AC-DC adapter that ouputs
> > 9v DC at 600mA. Any Ideas what is going on? Thanks
> >
> > --
> > Gerrit Padgham
> > gpadgham@u...
>
> --
>
> Dennis Clark http://www.verinet.com/~dlc
> dlc@v...
>
--
Dennis Clark http://www.verinet.com/~dlc
dlc@v...
>Thanks for your recomendation. I have looked, but honestly, I am not
>exactly sure what I'm looking for, or where to look. If you could be a
>little more detailed I would really appreciate it. Thanks.
>
Last I saw the software, I believe it was called Version 1.09, but
sending a note to Parallax would be the best bet.
Regards,
Bruce
>--
>Gerrit Padgham
>gpadgham@u...
>
>
Original Message
>From: Dennis Clark [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=VSG5zDuW3qP3xgN-_IOG6MAHbBFppWobdssXUVFqffQgAXWTeJEU_oekP_65zn-SVhQ7k37dNRXD]dlc@v...[/url
>Sent: Monday, April 10, 2000 5:55 PM
>To: basicstamps@egroups.com
>Subject: Re: [noparse][[/noparse]basicstamps] programming problems
>
>
>Gerrit,
>
> Check the Parallax site, they say they have a fix for some of these
>issues.
>Usually, programs that access Wintel hardware directly won't run on W2K or
>WNT OS's - protected memory won't allow that.
>
>DLC
>
>Gerrit Padgham wrote:
>>
>> I just got a brand new basic stamp IIsx starter kit the other day. I have
>> been unsuccessful at downloading a program to it to run. I am using v.
>1.04
>> of the software on a windows 2000 platform. I also tried the same thing
>on
>> a windows NT 4.0 platform. When I try to download a program the following
>> error appears:
>>
>> BASIC Stamp II detected but not responding on COM1! Check Power Supply.
>>
>> I have tried a brand new 9v with it, and also an AC-DC adapter that ouputs
>> 9v DC at 600mA. Any Ideas what is going on? Thanks
>>
>> --
>> Gerrit Padgham
>> gpadgham@u...
>
>--
>
>Dennis Clark http://www.verinet.com/~dlc
>dlc@v...
>
>
>
>
>
>
>
>
sensors. When one sensor picks up an object it will turn on one
motor. What I am trying to do is keep that motor locked high until a
different sensor picks up an object. So far it will only turn on
when the sensor is sensing an object like a wall, then it turns off
as soon as its out of range. I tried using a loop but i couldnt get
it to go back to the sensor code. Is there any way to do this?
Ray
Here is the code:
'{$STAMP BS2}
ADist var word
BDist var word
CDist var word
DDist var word
SonarAInit con 0
SonarAEcho con 1
SonarBInit con 2
SonarBEcho con 3
SonarCInit con 4
SonarCEcho con 5
SonarDInit con 6
SonarDEcho con 7
convfac con 74
MinDist con 6
CheckSonar:
OneSonar:
pulsout SonarAInit,5
output SonarAInit
rctime SonarAEcho,1,ADist
ADist=ADist/convfac
pause 10
TwoSonar:
pulsout SonarBInit,5
output SonarBInit
rctime SonarBEcho,1,BDist
BDist=BDist/convfac
pause 10
ThreeSonar:
pulsout SonarCInit,5
output SonarCInit
rctime SonarCEcho,1,CDist
CDist=CDist/convfac
pause 10
FourSonar:
pulsout SonarDInit,5
output SonarDInit
rctime SonarDEcho,1,DDist
DDist=DDist/convfac
pause 10
IF ADist<MinDist THEN BackOne
IF BDist<MinDist THEN BackTwo
IF CDist<MinDist THEN BackThree
IF DDist<MinDist THEN BackFour
BackOne:
High 8
High 9
Low 10
Low 11
GOTO CheckSonar
BackTwo:
Low 8
High 9
High 10
Low 11
GOTO CheckSonar
BackThree:
Low 8
Low 9
High 10
High 11
GOTO CheckSonar
BackFour:
Low 8
Low 9
Low 10
Low 11
GOTO CheckSonar
This one begs a state machine solution. The following should (i.e.,
haven't tried it but it oughta be close) detect any new
less-than-minimum conditions and change things only when that
occurs.
'{$STAMP BS2}
ADist var word
BDist var word
CDist var word
DDist var word
this_state VAR NIB
last_state VAR NIB
SonarAInit con 0
SonarAEcho con 1
SonarBInit con 2
SonarBEcho con 3
SonarCInit con 4
SonarCEcho con 5
SonarDInit con 6
SonarDEcho con 7
convfac con 74
MinDist con 6
last_state = 1 ' provide initial direction
OUTC = 1 ' provide initial state
DIRC = $F ' set pins to output
CheckSonar:
OneSonar:
pulsout SonarAInit,5
output SonarAInit
rctime SonarAEcho,1,ADist
ADist=ADist/convfac
pause 10
TwoSonar:
pulsout SonarBInit,5
output SonarBInit
rctime SonarBEcho,1,BDist
BDist=BDist/convfac
pause 10
ThreeSonar:
pulsout SonarCInit,5
output SonarCInit
rctime SonarCEcho,1,CDist
CDist=CDist/convfac
pause 10
FourSonar:
pulsout SonarDInit,5
output SonarDInit
rctime SonarDEcho,1,DDist
DDist=DDist/convfac
pause 10
this_state.BIT0 = MinDist/ADist MAX 1
this_state.BIT1 = MinDist/BDist MAX 1
this_state.BIT2 = MinDist/CDist MAX 1
this_state.BIT3 = MinDist/DDist MAX 1
IF this_state | last_state = last_state THEN checkSonar
last_state = this_state
OUT8 = this_state.BIT0
OUT9 = OUT8 | this_state.BIT1
OUT10 = OUT9 | this_state.BIT2
OUT11 = this_state.BIT3
GOTO checkSonar
strange. The motors do lock on but one stays on all the time
regardless and when another sensor picks up it doesnt turn off. I
am not sure I understand this state machine.
--- In basicstamps@y..., "S Parkis" <parkiss@e...> wrote:
> Ray-
>
> This one begs a state machine solution. The following should
(i.e.,
> haven't tried it but it oughta be close) detect any new
> less-than-minimum conditions and change things only when that
> occurs.
>
> '{$STAMP BS2}
>
> ADist var word
> BDist var word
> CDist var word
> DDist var word
> this_state VAR NIB
> last_state VAR NIB
>
> SonarAInit con 0
> SonarAEcho con 1
> SonarBInit con 2
> SonarBEcho con 3
> SonarCInit con 4
> SonarCEcho con 5
> SonarDInit con 6
> SonarDEcho con 7
>
> convfac con 74
> MinDist con 6
>
> last_state = 1 ' provide initial direction
> OUTC = 1 ' provide initial state
> DIRC = $F ' set pins to output
>
> CheckSonar:
>
> OneSonar:
> pulsout SonarAInit,5
> output SonarAInit
> rctime SonarAEcho,1,ADist
> ADist=ADist/convfac
> pause 10
>
> TwoSonar:
> pulsout SonarBInit,5
> output SonarBInit
> rctime SonarBEcho,1,BDist
> BDist=BDist/convfac
> pause 10
>
> ThreeSonar:
> pulsout SonarCInit,5
> output SonarCInit
> rctime SonarCEcho,1,CDist
> CDist=CDist/convfac
> pause 10
>
> FourSonar:
> pulsout SonarDInit,5
> output SonarDInit
> rctime SonarDEcho,1,DDist
> DDist=DDist/convfac
> pause 10
>
> this_state.BIT0 = MinDist/ADist MAX 1
> this_state.BIT1 = MinDist/BDist MAX 1
> this_state.BIT2 = MinDist/CDist MAX 1
> this_state.BIT3 = MinDist/DDist MAX 1
> IF this_state | last_state = last_state THEN checkSonar
> last_state = this_state
> OUT8 = this_state.BIT0
> OUT9 = OUT8 | this_state.BIT1
> OUT10 = OUT9 | this_state.BIT2
> OUT11 = this_state.BIT3
> GOTO checkSonar
> Hey thanks for giving it a shot. I tried it and it acts a little
> strange. The motors do lock on but one stays on all the time
> regardless and when another sensor picks up it doesnt turn off. I
> am not sure I understand this state machine.
Maybe the error will be evident by trying to explain how it's meant
to work.
> this_state.BIT0 = MinDist/ADist MAX 1
> this_state.BIT1 = MinDist/BDist MAX 1
> this_state.BIT2 = MinDist/CDist MAX 1
> this_state.BIT3 = MinDist/DDist MAX 1
this_state.BIT0 will be 1 if ADist <= MinDist. Similarly for the
other three bits in this_state.
> IF this_state | last_state = last_state THEN checkSonar
Unless a newly detected less-than-minimum condition is found (a 0 to
1 transition), keep the motors cranking away the same.
If a new less-than-minimum is detected, react accordingly as
follows:
> last_state = this_state
> OUT8 = this_state.BIT0
> OUT9 = OUT8 | this_state.BIT1
> OUT10 = OUT9 | this_state.BIT2
> OUT11 = this_state.BIT3
Looking at your original code, it appears that I/O 8 is driven high
when ADist < MinDist; I/O 9 is high when ADist < MinDist or BDist <
MinDist; I/O 10 is high when BDist < MinDist or CDist < MinDist; I/O
11 is high when CDist < MinDist. That's what the above four lines of
code are meant to do.
> GOTO checkSonar
Perhaps by sprinkling your code with some DEBUG statements you can
find and fix the error. I still don't see it...probably looking
right through and past it. Maybe someone else will see the problem.
Regards,
Steve
Well after messing around with the code for awhile i finally got
it. I got the four sensors to drive the four motors. The code I
had before combined two motors at once. this one works. thanks a
lot for the help.
Ray
'{$STAMP BS2}
ADist var word
BDist var word
CDist var word
DDist var word
this_state VAR NIB
last_state VAR NIB
SonarAInit con 0
SonarAEcho con 1
SonarBInit con 2
SonarBEcho con 3
SonarCInit con 4
SonarCEcho con 5
SonarDInit con 6
SonarDEcho con 7
convfac con 74
MinDist con 6
last_state = 1 ' provide initial direction
OUTC = 1 ' provide initial state
DIRC = $F ' set pins to output
CheckSonar:
OneSonar:
pulsout SonarAInit,5
output SonarAInit
rctime SonarAEcho,1,ADist
ADist=ADist/convfac
pause 10
TwoSonar:
pulsout SonarBInit,5
output SonarBInit
rctime SonarBEcho,1,BDist
BDist=BDist/convfac
pause 10
ThreeSonar:
pulsout SonarCInit,5
output SonarCInit
rctime SonarCEcho,1,CDist
CDist=CDist/convfac
pause 10
FourSonar:
pulsout SonarDInit,5
output SonarDInit
rctime SonarDEcho,1,DDist
DDist=DDist/convfac
pause 10
this_state.BIT0 = MinDist/ADist MIN 0
this_state.BIT1 = MinDist/BDist MIN 0
this_state.BIT2 = MinDist/CDist MIN 0
this_state.BIT3 = MinDist/DDist MIN 0
IF this_state | last_state = last_state THEN checkSonar
last_state = this_state
OUT8 = this_state.BIT0
OUT9 = this_state.BIT1
OUT10 = this_state.BIT2
OUT11 = this_state.BIT3
GOTO checkSonar
interface for the Basic Stamp 2. I tried to write my own send
function, but it always gives me a cryptic "something is wrong here"
message. So I started looking at the EditorMaster and LoadMaster
code, but they are written in pascal and I use c++. Normally thats
not a problem, but it uses a CSpinEdit and I dont have the file
(CSpin.dcu) to use it. If anyone can help with either of these
problems I would greatly appreciate it. I am using Borland C++
Builder and running Windows XP.
thnx