void shoot()
{
pulsetrain();
delayMicroseconds(63200);
pulsetrain();
}
void pulse()
{
digitalWrite(irled, HIGH);
delayMicroseconds(13);
digitalWrite(irled, LOW);
delayMicroseconds(13);
}
void pulsetrain()
{
for (int i = 0; i < 77; i++){//initial pulse
pulse();
}
delayMicroseconds(27830); //wait for datapulse
for (int i = 0; i < 15; i++){//next pulse
pulse();
}
delayMicroseconds(1580); //wait for datapulse
for (int i = 0; i < 16; i++){//next pulse
pulse();
}
delayMicroseconds(3580); //wait for datapulse
for (int i = 0; i < 16; i++){//next pulse
pulse();
}
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment