Bizarre serial input behavior - Input from experienced users appreciated!

Especially someone who isn't more than a hack coder if that.

GoForSmoke, you are wasting your time arguing with zoomkat. His mind is made up and nothing is going to convince him that he is wrong. Just look at the number of his posts arguing that String is a great class or that delay() in reading serial data, so that the next character has time to arrive, is a good technique.

PaulS:

Especially someone who isn't more than a hack coder if that.

GoForSmoke, you are wasting your time arguing with zoomkat. His mind is made up and nothing is going to convince him that he is wrong. Just look at the number of his posts arguing that String is a great class or that delay() in reading serial data, so that the next character has time to arrive, is a good technique.

So who delivered to the design specification? Remember "Those that can, do. Those that can't usually whine about those that can." 8)

So who delivered to the design specification?

Who delivered what design specification? Who accepted that the design specification was correct without question?

Those that can, do.

Yes, we do. I've posted code that reads serial data without delay at least as often as you've posted code with delay().

I've posted code and examples that don't use the problematic String class at least as often as you've ignored the posts that explain that there IS an acknowledged issue with the underlying code that String relies on.

Who delivered what design specification? Who accepted that the design specification was correct with question?

Probably the saddest thing you'll ever see is a mosquito sucking on a mummy. Forget it, little friend. - Deep Thoughts by Jack Handy

PaulS:
I've posted code and examples that don't use the problematic String class at least as often as you've ignored the posts that explain that there IS an acknowledged issue with the underlying code that String relies on.

What can you say to someone who thinks that using bit logic to set pins HIGH or LOW as 1 and 0 is a bad idea because someday HIGH and LOW might be some other numbers and we have to preserve future portability. That someone hasn't figured out that booleans are 1 bit and you can pack 8 in a byte, for lack of practice. Try that with "other values for HIGH and LOW".
It's no big deal to waste bytes on a PC with a few Gigs of RAM but that attitude is sadly uninformed on Arduino.

Yeah Paul, I know. The dedication to String Objects on Arduino is another symptom.

Zoomkat is a he?

GoForSmoke:

PaulS:
I've posted code and examples that don't use the problematic String class at least as often as you've ignored the posts that explain that there IS an acknowledged issue with the underlying code that String relies on.

What can you say to someone who thinks that using bit logic to set pins HIGH or LOW as 1 and 0 is a bad idea because someday HIGH and LOW might be some other numbers and we have to preserve future portability. That someone hasn't figured out that booleans are 1 bit and you can pack 8 in a byte, for lack of practice. Try that with "other values for HIGH and LOW".
It's no big deal to waste bytes on a PC with a few Gigs of RAM but that attitude is sadly uninformed on Arduino.

Yeah Paul, I know. The dedication to String Objects on Arduino is another symptom.

Zoomkat is a he?

Why? You and PaulS getting tired of stroking each others puds? Good forum entertainment! :wink:

Just seeing if you have anything of substance to say.

Nope.

GoForSmoke:
Just seeing if you have anything of substance to say. Nope.

Spin control!!! Struggling!!! Best stick to technical coding topics.

tani357:
The professor is looking for function, not form or good practice

Whoa.

tani357:
After a valid angle is entered, the servo must rotate at a rate of 45 deg/sec to the requested position.

Yes, but once you have set the terminal monitor to add a newline it always does that. So do that before the demo.

Then you type in "45" or whatever and hit Send. Nothing gets sent until you hit Send anyway, so you may as well have the newline sent as well.

That was my first impression also, many Profs I've known would rather talk about how something should be accomplished rather then do anything constructive to help make it happen. :wink: Maybe it's a mechanical engineering prof, they seem to be much better grounded then others.

Lefty

Spin control!!! Struggling!!!

Yes, that describes you perfectly.

I would like everyone in this thread to stick to answering technical questions and not bicker or insult each other.

Thank you.

Otherwise I'll lock it.

Strong, bulletproof if possible, highly responsive User I/O -is- function.

The form you use is up to you. I know what works for me from long working experience so I can share that. Try it both ways and then try another, see what's easier and what's harder and most important, Why.

I think you should use parseInt() if your prof couldn't give a fig about your code. You'll save time and effort on your grade. The grade that you want what kind of help for? Not general advice?

You'll know if your prof cares about your code by what he does as the User. Will the User be required to enter only legal inputs? What if the User enters ABC? If your prof is required to only enter up to 3 digits always then you can get away with not coding error handling which as a pro you can't because in the Real World, users make bad entries but as a student what will you get? A test of function with or without unexpected, human, input?

The spec says using serial monitor the user must do X and see Y. Nothing about how serial monitor is set up. Set it up and close it, next time it opens the setting is still the same. Then have your user do what is required and your code do what it should.

But I'll just stop trying to help. I don't know enough.