原理分析:

Jetson Nano控制SIM7020 开关机_引脚

import Jetson.GPIO as GPIO
import time

pwr_pin = 7
GPIO.setmode(GPIO.BOARD)
GPIO.setup(pwr_pin, GPIO.OUT)
pwr_pin = 7
GPIO.setmode(GPIO.BOARD)
GPIO.setup(pwr_pin, GPIO.OUT)


try:


print("switch")
GPIO.output(pwr_pin, GPIO.HIGH)
time.sleep(2)
# print("off")
GPIO.output(pwr_pin, GPIO.LOW)
# time.sleep(2)

except KeyboardInterrupt:
GPIO.output(pwr_pin, GPIO.LOW)
GPIO.cleanup()
print("done")

运行程序,拉高7引脚两秒,改变开关机状态:

sudo python3 pwr.py