TBTracker-RX
TBTracker-RX copied to clipboard
No time for flashPin() in v0.0.9
Hi Roel
Just a thought, how about seperating out flashPin to FlashPinOn and flashPinOff and then call flashPin() here:
https://github.com/RoelKroes/TBTracker-RX/blob/3eb512ee653bbf4a04b8aa345d0750b91f586985/radio.ino#L328
if (validPacket)
{
flashPinOn()
packetCounter++;
getMetafromRaw((char *) buf);
parseRawData((char *) buf);
flashPinOff()
}
I havent had the time to time that code, but if it really doesn't take long enough to see the flash, then you could of course just toggle the LED for each packet:
void flashPinToggle()
{
digitalWrite(FLASH_PIN, !digitalRead(FLASH_PIN));
}
That code can be optimised massivley if needed, but at the cost of compatibility.
Just a thought :)
Cheers Kev