I want to use an Arduino Uno for enabling/disabling a diesel injector. The idea is to have 2 inputs, and 1 output. Input one is to enable the diesel injector, by a manual start button (one shot). Input two is for receiving TTL pulses which represent the number of injections are done. The output should function as interruption. This contact should close (become high) upon pushing the start button. It should open in case there is no power applied, or when the number of programmed pulses on input two is reached. TTL pulses are like 1msec wide, at dutycle 50%.
Because I want to be able to change the number of injections allowed easily, I want to start using this programmable device. playing with my device, trying different numbers for the example "Button State Change" , I think this should be possible. When looking at this program example, it looks logical to me, but I have no experience in programm languages. Therefore I am wondering how to insert an extra input which will allow the device to start (reset)again after a cyclus.
Is there already a programm available for this, or can anyone give me some direction in starting developing?
Thanks in advance, regards, Theo