Note: withdrawing more current(~15mA) from GPIO can affect the Rpi
https://raspberrypi.stackexchange.com/questions/9298/what-is-the-maximum-current-the-gpio-pins-can-output
- Use 5V Pin (2,4)
- Use GPIO as Negative volt
- Max current withdrawn was 23mA for my use case
import RPi.GPIO as GPIO
from time import sleep
import sys
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)
GPIO.setup(21, GPIO.OUT, initial=GPIO.HIGH)
if sys.argv[1] == "on":
GPIO.output(21, GPIO.LOW)
#print("on")
exit()
Fore More brightness:
- Add multiple GPIO as GROUND
- After adding GPIO20 as ground it was taking ~18mA from GPIO20
- And Overall of ~36mA from both GPIO 20 and 21