PaulS was just saying, in a rather humorous way IMHO, that wanting to do things "fast" and combining that with serial comms, is a contradiction in requirements.
It's like saying you want to organize a fast turtle race.
Ah that makes sense now. I'm not sure how clear I was in that other thread and this one, but I'm not familiar with microcontrollers; I typically work with/on PCs, or in the case of my job, a completely proprietary system with proprietary software. What I'm getting at is my implicit communication skills in this world are going to be a while in developing. Kind of like how sarcasm is lost on young children. I do try to do some research and/or trial & error before I ask questions though.
Stop right there. First, your code is wrong in about 5 points. If you are going to say code X doesn't work, post code X, and prove it. Missing semicolons, "high" instead of "HIGH", incorrect capitalization of digitalWrite and so on.
So you are saying this code:
Does not turn pin 2 high and pin 3 low?
No, my point was, and up till I just figured out my logic error, always was, that the *second line*, ie "digitalWrite(3, LOW);" was not executing. In this case it just appeared to not be executing when it actuality it was; without proper conditional logic another function was just writing all over it and it was looping fast enough that it appeared to not work. The dim LED was somewhat of a clue, albeit it too faint for me to pick up on.
So stop trying to use digitalWriteFast
Is it not a good idea to use this library? Or does this fall under the fact that if it doesn't work normally it won't work optimized?
Have you set the pins to outputs? First important point. If not, we can skip the rest.
In fact, post your whole code, not just snippets, because that hides whatever-it-is you are doing that causes the problem that you perceive.
I'm not trying to be rude, but I'm going to be blunt here: it's in the OP. In a code block labeled "Here's the test code I'm working on:"
If you or someone else would be so kind as to confirm if activating digitalwrite()'s on sequential pins is *supposed* to work, I would much appreciate it.
Do you seriously think Atmel would sell any chips if you could not turn on or off two things in a row reliably? Of course it is supposed to work.
When I'm new to a piece of tech and it's not working the way I want, I try removing unsubstantiated assumptions, guesses, or things I "think" I know. As not having a clue, I could only assume that was the case, as I had little to no proof it was one way or another. In fact, I even went so far as to postulate something halfway plausible as to why it might not work the way I originally thought it would.
Someone once said that you can't actually debug your own code because if you're not capable enough to see the problem, you can't see it. Or something like that. It was smart & deep. Anyways, I thought I had double and triple checked my code at that point, which is why I started to wonder about other things.
I know microcontrollers are more limited than PCs in some aspects, but I don't quite understand the hows and whys and limits of that concept, so I looked around, came up with a guess, and asked if I was close or way off. Seems that this time I was way off. That's what I meant by:
I'm not sure if I did something stupid, or just didn't take into account the nature of the architecture.
In this case it was the former. For reference, my first foray into my company's language landed me in the latter.