I am new to python on microcontrollers and having some issues running the shutdown of the lepton sensor. I am using the sensor.shutdown() to disable the lepton when battery voltage drops below 2.9V or the temperature is above 65c but the shutter continues to activate. Does sensor.shutdown work with the lepton? If not, what routine controls power to the lepton?
Also, the temperature rises abruptly when vbatt drops below 3.3v. unsure why, but I can hit 105c at 2.9v when the microcontroller is really at 40c.
if H7_TEMPC > 65 :
lptn_error = 4
pyb.LED(GREEN_PIN).on()
sensor.shutdown(True)
if sleep_mode == 1 :
pyb.stop()
if H7_VBATT < 2.9 :
lptn_error = 1
pyb.LED(GREEN_PIN).on()
sensor.shutdown(True)
if sleep_mode == 1 :
pyb.stop()