def mytest1():
pyb.LED(RED_LED_PIN).on()
#sensor.skip_frames(time = 2000) # 给用户一个时间来准备
pyb.LED(RED_LED_PIN).off()
pyb.LED(BLUE_LED_PIN).on()
print("You're on camera!")
img = sensor.snapshot()
pyb.LED(BLUE_LED_PIN).off()
print("Done! Reset the camera to see the saved image.")
wuphoto=img
return
To:
def mytest1():
global wuphoto
pyb.LED(RED_LED_PIN).on()
#sensor.skip_frames(time = 2000) # 给用户一个时间来准备
pyb.LED(RED_LED_PIN).off()
pyb.LED(BLUE_LED_PIN).on()
print("You're on camera!")
img = sensor.snapshot()
pyb.LED(BLUE_LED_PIN).off()
print("Done! Reset the camera to see the saved image.")
wuphoto=img
return
Yeah… it’s pretty crazy you are crashing the IDE. I see that you are sending a corrupt JPEG to the IDE.
Question, do you have an SD card plugged into the camera.
Anyway, can you run the bellow world example with RGB565 and FHD resolution? I don’t know how you are crashing the IDE as this should not be possible. However, a corrupted JPEG being sent to the IDE could.
If you don’t have an SD card then you are probably overflowing the internal flash of the camera when you try to save an image. It has a very small disk onboard which is just meant really for read only files. It’s not meant to save images to.
The H7 plus has 32MB of Flash though. So, it can save some pictures. However, it depends on if the disk is already full of stuff. I would use an SD card though to save pictures.
The H7 plus has 32MB of Flash though. So, it can save some pictures. However, it depends on if the disk is already full of stuff.
-----------------yes,the flash has 30MB at lesat ,my code size is not more than 50Kb.
i wonder what wrong with my code.