Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No time for flashPin() in v0.0.9 #10

Open
KevWal opened this issue Apr 21, 2023 · 1 comment
Open

No time for flashPin() in v0.0.9 #10

KevWal opened this issue Apr 21, 2023 · 1 comment

Comments

@KevWal
Copy link
Contributor

KevWal commented Apr 21, 2023

Hi Roel

Just a thought, how about seperating out flashPin to FlashPinOn and flashPinOff and then call flashPin() here:

packetCounter++;

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

@RoelKroes
Copy link
Owner

Hi Kev,

That is such an excellent, out-of-the-box idea! Elegant, yet so simple. Thank you for that.
I will time the process and implement it as soon as I can. It will hopefully solve the flashpin problem.

Roel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants