Ok, got it up and running with the Arduino running on 1 hall effect at this time.
Yeap, yeap, yeap, there you go...
Push-pull with a half-bridge? Yes you can. Just need a bipolar power source--two batteries.
"If" statements, also known as fuzzy logic. You can reduce much of this by coordinated
logic. For example:
Instead of:
if ((x && y && z) || (a && b)) { digitalWrite(A0, HIGH); }
Change things to:
digitalWrite(A0, ((x && y && z) || (a && b)));
A novice programmer will have a more difficult time reading the second expression
I fully get that, but the idea is to let the power of logic do the work for you. Once
you begin to think in logical operations, your code can be transformed directly to
pure hardware if ever need be. When I first started writing VHDL and later Verilog,
it took me quite a while to change my thinking and one day after many days fussing
with my code, the light came on for me. I never looked back. Now I can sit down
and draw up a state machine, map it directly to logic components and have it work
flawlessly. And the beauty in all this is, with logic you can't drive an Arduino pin
both high and low at the same time--one expression defines exactly what that
pin needs to do. You can execute that expression as often as you need to and
it will always do the right thing defined by your logic. Should you get in a situation
where you simply cannot process the logic changes fast enough, grab some actual
logic gate chips and wire them up the same way. It will run as fast as the chips can
go, usually in the MHz range.