![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
programmable ignition for an mz ts 150. The interruptor needs to be replaced by an hall effect sensor
main.cpp@3:5efd78be4662, 2015-10-25 (annotated)
- Committer:
- johannes_otto
- Date:
- Sun Oct 25 16:58:59 2015 +0000
- Revision:
- 3:5efd78be4662
- Parent:
- 2:469b3daa6b98
constructor requires stroke now, it accepts mm values instead of degree (its easier and more accurate to measure). The angles are computed automatically
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
johannes_otto | 0:46797506f6f3 | 1 | #include "mbed.h" |
johannes_otto | 3:5efd78be4662 | 2 | #include "IgnitionModule.h" |
johannes_otto | 2:469b3daa6b98 | 3 | |
johannes_otto | 3:5efd78be4662 | 4 | InterruptIn interruptor(D15); |
johannes_otto | 3:5efd78be4662 | 5 | IgnMod ignition(D4,100,6.0f,3.0f,58.0f); |
johannes_otto | 1:f99510926784 | 6 | |
johannes_otto | 0:46797506f6f3 | 7 | int main() |
johannes_otto | 3:5efd78be4662 | 8 | { |
johannes_otto | 3:5efd78be4662 | 9 | wait(1); |
johannes_otto | 3:5efd78be4662 | 10 | interruptor.rise(&ignition,&IgnMod::ignite); |
johannes_otto | 2:469b3daa6b98 | 11 | interruptor.mode(PullUp); |
johannes_otto | 3:5efd78be4662 | 12 | while(1) { |
johannes_otto | 0:46797506f6f3 | 13 | } |
johannes_otto | 0:46797506f6f3 | 14 | } |