Subject:
|
Re: Run Time error 1
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Fri, 8 Nov 1996 22:50:28 GMT
|
Original-From:
|
Fred G. Martin <fredm@!NoMoreSpam!media.mit.edu>
|
Viewed:
|
1701 times
|
| |
| |
Peter:
run-time error 1 is "no stack place for start_process()". This is
given in the IC/Handy Board manual.
The reason is your "repeat" procedure, which keeps making more
processes!! Instead of this, put each of your subprocesses in a loop;
e.g:
void wisker1(void)
{
while (1) {
while(analog(0)> 12);
{
bk(1); /*30*/
bk(0);
sleep(.5);
fd(0);
sleep(1.5);
fd(1);
fd(0);
}
}
}
Then you need only start the "wisker1" process once and it keeps
running.
-Fred
In your message you said:
> This is a multi-part message in MIME format.
>
> --------------66E628573ECA
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> Hello,
> I'm new at IC and I don't really know how to fix all the errors yet.
> Can you please download the attached file and look it over for any
> problems and tell me how to fix the Run Time Error 1.
>
> Thank You,
> Peter Eacmen
>
> --------------66E628573ECA
> Content-Type: text/plain; charset=us-ascii; name="newbug.c"
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline; filename="newbug.c"
>
> void main(void)
> {
> printf(" I am the Lego Bug!!");
> while(!start_button());
> start_process(legobug());
> }
>
> /*-----------------------------------------*/
>
> void legobug(void)
> { /*10*/
> {
> fd(0);
> fd(1);
> }
> {
> start_process(wisker1());
> start_process(wisker2());
> start_process(light());
> start_process(emerstop());
> start_process(repeat()); /*20*/
> }
> }
>
> /*-----------------------------------------*/
>
> void wisker1(void)
> {
> while(analog(0)> 12);
> {
> bk(1); /*30*/
> bk(0);
> sleep(.5);
> fd(0);
> sleep(1.5);
> fd(1);
> fd(0);
> }
> }
>
> /*------------------------------------------*/ /*40*/
>
> void wisker2(void)
> {
> while(analog(1)> 12);
> {
> bk(1);
> bk(0);
> sleep(.5);
> fd(1);
> sleep(1.5); /*50*/
> fd(1);
> fd(0);
> }
> }
>
> /*-------------------------------------------*/
>
> void light(void)
> {
> while(analog(1)< 100); /*60*/
> bk(0);
> bk(1);
> }
>
> /*--------------------------------------------*/
>
> void emerstop(void)
> {
> while(!stop_button());
> ao(); /*70*/
> }
>
> /*----------------------------------------------*/
>
> void repeat(void)
> {
> start_process(legobug());
> } /*79*/
> --------------66E628573ECA--
>
>
|
|
Message is in Reply To:
| | Run Time error 1
|
| Hello, I'm new at IC and I don't really know how to fix all the errors yet. Can you please download the attached file and look it over for any problems and tell me how to fix the Run Time Error 1. Thank You, Peter Eacmen (28 years ago, 8-Nov-96, to lugnet.robotics.handyboard)
|
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|