Page 5 of 7

Re: NXT PROBLEM

Posted: 26 Jun 2013, 16:18
by HaWe

Re: NXT PROBLEM

Posted: 26 Jun 2013, 19:43
by naneczek
I gave you the code, but you didn't even refer to it, whether it is good or not. Not a pinch of a code-feedback from you:) Only words...

Code: Select all

task main() {

ClearScreen();

int y;

int i;

int tab[100];

SetSensorLowspeed(IN_4);

        for(int i=0; i<100; i++)

              tab[i]=SensorUS(IN_4);}


}
        for (i=0;i<100;++i) {
                  y=tab[i];
                  if (i==99) ClearScreen();

                  LineOut(i, y/4, DRAW_OPT_NORMAL);
                  NumOut(0,56, y, DRAW_OPT_CLEAR);


                  }

while (true);

}
Please modify it if it's wrong...

Re: NXT PROBLEM

Posted: 26 Jun 2013, 19:55
by HaWe

Re: NXT PROBLEM

Posted: 26 Jun 2013, 20:02
by HaWe
aaah, now - you edited your post.

Code: Select all

task main() {

ClearScreen();

int y;

int i;

int tab[100];

SetSensorLowspeed(IN_4);

        for(int i=0; i<100; i++)

              tab[i]=SensorUS(IN_4);}


}
        for (i=0;i<100;++i) {
                  y=tab[i];
                  if (i==99) ClearScreen();

                  LineOut(i, y/4, DRAW_OPT_NORMAL);
                  NumOut(0,56, y, DRAW_OPT_CLEAR);


                  }

while (true);

}
The code won't work. The reasons are quite the same as before.

The indentations are wrong, additionally.

Think about what your doing.
Describe what you're doing, line for line.

test the code.
If you have no NXT to test, wait until you'll have one again.

Re: NXT PROBLEM

Posted: 26 Jun 2013, 20:04
by naneczek
You see, only words, not code:) Ok, maybe I will find somebody else who will help me more, because you just don't want to...

Re: NXT PROBLEM

Posted: 26 Jun 2013, 20:05
by HaWe

Re: NXT PROBLEM

Posted: 26 Jun 2013, 20:10
by naneczek
I clearly get it. You said that you won't write the whole code for me. Ok, I wrote sth, and you would only apply some changes or give some advice what to change in this code but you are not willing to..so? As you can see I don't know how to change it, what to do, I've joined this forum, so that somebody would give me a helping hand, modify code.

Re: NXT PROBLEM

Posted: 26 Jun 2013, 20:12
by HaWe

Re: NXT PROBLEM

Posted: 26 Jun 2013, 20:17
by naneczek
Hmm, please be so kind and discontinue sharing such tainted opinions. I can read but it is clear for me that you can't. If you really don't want to help me, just say it. Because now, you only write about indentations and not about the core thing which is the code, I wonder why...

Re: NXT PROBLEM

Posted: 26 Jun 2013, 20:18
by HaWe
ok, I give up.