NXT PROBLEM

Discussion specific to projects ideas and support.
naneczek
Posts: 28
Joined: 08 Jun 2013, 10:09

Re: NXT PROBLEM

Post 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...
Last edited by naneczek on 26 Jun 2013, 19:58, edited 1 time in total.
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: NXT PROBLEM

Post 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.
Last edited by HaWe on 26 Jun 2013, 20:04, edited 2 times in total.
naneczek
Posts: 28
Joined: 08 Jun 2013, 10:09

Re: NXT PROBLEM

Post 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...
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: NXT PROBLEM

Post by HaWe »

naneczek
Posts: 28
Joined: 08 Jun 2013, 10:09

Re: NXT PROBLEM

Post 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.
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: NXT PROBLEM

Post by HaWe »

naneczek
Posts: 28
Joined: 08 Jun 2013, 10:09

Re: NXT PROBLEM

Post 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...
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: NXT PROBLEM

Post by HaWe »

ok, I give up.
Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests