You can check the VBUS by testing the value of 'WL_GPIO2' pin, if it's high, the VBUS is present, e.g:
Code:
from machine import Pinvbus = Pin('WL_GPIO2', Pin.IN)if vbus(): print('USB connected')else: print('USB not connected')
Statistics: Posted by horuable — Mon Jul 15, 2024 5:46 am