I just wanted to take a look at this problem from the hardware point of view. Contrary to the a normal USB cable, there are 5 pins in the head of USB Micro-B plug and the fifth pin has been added for indicating the mode of your device: to be a host or guest. When it is attached to the ground(as it is in OTG cable) the mobile or tablet is put into the host mode and then it provides a 5V power the the possible peripherals too. If it remains unattached, the USB is to be used for charging and (or connecting to a computer) and so it doesn't provide power. So, for doing this project, if possible, at least we need a power supply for our peripherals.
Amazon Dies In Darkness
- 4.8k
- 23
- 65
- 105