I need to simulate a crank position sensor from an automotive system. It utilizes a "60-2" toothet wheel.
Generating a PWm signal with varying frequenzy is not hard at all, but I cannot quite see how to stop generating the signal for two periods.
generate a 60 pulse signal and AND this signal with one that is low for two pulses. This latter can be made by feeding the 60 pulse back to an Arduino IRQ line and the following pseudocode
irq()
{
count++;
if (count< 59) digitalWrite(pin. HIGH)
else digitalWrite(pin, LOW)
if (count == 60) count = 0;
}