Selectivity betwenn charging and lighting

Hi
my task is to design a circuit that on one side has a usb that charges a battery and on the other a led.
The circuit is equipped with a button.
I saw various tutorials on youtube and designed it.
But I wish that when it is charging it is not possible to turn on the led. Which circuit allows me to do this selectivity?

If you are talking about the LED_BUILTIN, find and remove the parts of the sketch that write to it.

If it is an external LED, do the same as above, or remove the LED.

well, i m talking about schematics, not about firmware.

Please post your current schematic so we can see what you have so far.


that is my schematic.

the top is the lighting
the bottom part is the recharging.

Your schematic is quite blurry.
Which charging IC are you using?

the IC is MCP738327T

I want that if USB is charging battery, led iunenabled

I don't see a simple way of doing it

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.