Hi, in my design I'm charging a battery using a USB connection.
I'm using the MK22FN256VLH12 uC in my project.
I will attach my code that I wrote. I'm adding Hysteresis so the LED doesn't blink both Green and Red at the same time when I'm at the threshold from Charged / Not Charged. I'm not sure if it's correct.
Any feedback would be great.