Well i'm tired, but I think this does it. This is I believe a completed version for multicylinder actuation, including building upon your previous design. This should provide much more accurate resolution of crankshaft degrees than the previous method. All statics values have been moved to consts, should work with any cam timings for single or multicylinder engines. I hope the math is more efficient than the digital writes, if so then this should perform better than the previous code by only calling digitalwrite on state change.
I have no way to test, yet, but i'm working on it. i have to build a hall signal generator for a test rig, then can see how my actuators perform. I did not modify the reluctor timing, but handled all the valve events.
Well i'm tired, but I think this does it. This is I believe a completed version for multicylinder actuation, including building upon your previous design. This should provide much more accurate resolution of crankshaft degrees than the previous method. All statics values have been moved to consts, should work with any cam timings for single or multicylinder engines. I hope the math is more efficient than the digital writes, if so then this should perform better than the previous code by only calling digitalwrite on state change.
I have no way to test, yet, but i'm working on it. i have to build a hall signal generator for a test rig, then can see how my actuators perform. I did not modify the reluctor timing, but handled all the valve events.