Program works fine, but only with serial port enabled

aarg: "would you like an x"?

Surely "x" is plural, so that should be "would you like an ek"?

(Just trying to lighten the mood here.....)

Qdeathstar: If you do what Paul suggests in the long run you'll get your answer and in the mean time you'll learn a better way to do something.

variable names matter a lot, especially once you start doing larger sketches....

After getting some other responses from people who had no idea what half the stuff meant, I realized that Paul was right, and in order for people to help, they need to understand what they are looking at first. As for the nested loops, I didn't even know you could do it a different way, and since it worked as intended, I didn't think I needed to change it, and Paul was right about that too.

His approach, however, leaves a lot to be desired. Seems he is more interested in telling people how stupid they are for making rookie mistakes than correcting them and steering them on the right track. Unless he was born programming, I am sure he made the same mistakes when he first started out.

Casslex: His approach, however, leaves a lot to be desired.

But then it is Forum, not a Help Desk. Folk help where and when they can, in the way they can.

No-one is obliged either to a) respond or b) read those responses. Ignore PaulS' responses in future, and that will be your loss not his. Yeah he's a bit shall we say "terse", but either read and absorb his responses and accept that terseness, or don't read his responses.

Casslex: His approach, however, leaves a lot to be desired.

I used to think like you. But then I put my ego away and put my big boy pants on. Want help? Than accept the help and quit getting riled up about the way that it's given.

@Casslex, as far as I can see your latest code is in Reply #11

If you are still looking for assistance please describe in English (not code) how the program is intended to work and what it actually does.

...R

aarg, your so aargressive!

Robin2: @Casslex, as far as I can see your latest code is in Reply #11

If you are still looking for assistance please describe in English (not code) how the program is intended to work and what it actually does.

...R

So here is what I am trying to do. The program reads the speed of a wire being fed through an automatic cutter via DC motor. This speed is then used to rotate a bowl that collects the wire in order to coil it. Once the wire is cut by the cutter, the swing arm rotates 180 degrees to present the next bowl to the cutter while the first one will be getting tied.

Stops are pretty crucial to the proccess since the wire halts several times in the cutter in order to strip the ends of the wire, and I want the bowl to pause at the same time, since otherwise it would rip or deform the wire being fed.

So the program is supposed to read the speed of the incoming wire, spin the bowl proportionately, once a set number of stops is reached, swing the new bowl into position and proceed to do the same thing.

Referring to Reply #26

That seems a nice clear description.

Does it imply that you need code something like this pseudo code

if (stopCount < stopMax) {
  if (wireMoving) {
     rotateBowl()
  } 
  else {
     stopBowl()
     stopCount = stopCount + 1;
  }
else {
  changeBowl()
  stopCount = 0
}

…R