Hi!
I'm doing a project and I would want to have an accessory port, so I can both give current from the device's battery to the accesory (like a sensor) or charge the device's battery if connected to a charge base.
Never both at once, and I could do two ports, but I'd like to have only one port for charging or expansion.
That sounds like an interesting project that could be a lot of fun! However, please keep in mind that we are not a free design or code-writing service. We’re more than happy to help with your design or code, but we need you to make an initial attempt. Please design and write your code, then post it along with an explanation of what’s not working properly.
Show Your Work First: Before asking for assistance, make an attempt to design or write the code yourself. Share your work along with details about what isn’t working.
Provide Clear Documentation: Since we can’t see your project, share an annotated schematic (best) or a clear drawing of your setup. Pictures are welcome, but avoid using Fritzing diagrams as they are wiring diagrams, not schematics, and are not ideal for troubleshooting.
Include Technical Details: If there is specific hardware involved, include links to technical information. There are often many versions of similar components, so precise details are essential.
I'm designing the device to be small, self-powered and portable, and I didn't know if such a power system could be possible with simple electronics.
I'd be using a development kit by lilygo that manages battery charging and status, but would like to use a port like the described on my op instead of a qwiic connector to use accesories and the usb C to charge; but I'm only asking if, with simple electronics I can do the "I power you or you power me" system.
I'm trying to make a small, self-powered and portable device, therefore my curiosity if I could have only that one port to do both functions, with some electronics