diff --git a/scripts/examples/01-Camera/01-Video-Recording/mjpeg_on_face_detection.py b/scripts/examples/01-Camera/01-Video-Recording/mjpeg_on_face_detection.py index a3b16deea..4e0b3dfb7 100644 --- a/scripts/examples/01-Camera/01-Video-Recording/mjpeg_on_face_detection.py +++ b/scripts/examples/01-Camera/01-Video-Recording/mjpeg_on_face_detection.py @@ -19,6 +19,7 @@ import image import time import mjpeg import random +import machine sensor.reset() # Reset and initialize the sensor. sensor.set_pixformat(sensor.GRAYSCALE) # Set pixel format to RGB565 (or GRAYSCALE) diff --git a/scripts/examples/05-Feature-Detection/keypoints_save.py b/scripts/examples/05-Feature-Detection/keypoints_save.py index 203ba7469..918ca283d 100644 --- a/scripts/examples/05-Feature-Detection/keypoints_save.py +++ b/scripts/examples/05-Feature-Detection/keypoints_save.py @@ -32,8 +32,8 @@ kpts = img.find_keypoints(max_keypoints=150, threshold=10, scale_factor=1.2) if kpts is None: raise (Exception("Couldn't find any keypoints!")) -image.save_descriptor(kpts, "/%s.orb" % (FILE_NAME)) -img.save("/%s.pgm" % (FILE_NAME)) +image.save_descriptor(kpts, "%s.orb" % (FILE_NAME)) +img.save("%s.pgm" % (FILE_NAME)) img.draw_keypoints(kpts) sensor.snapshot() diff --git a/scripts/examples/09-WiFi/WINC1500/fw_dump.py b/scripts/examples/09-WiFi/WINC1500/fw_dump.py index 81ac1c9e8..c93439533 100644 --- a/scripts/examples/09-WiFi/WINC1500/fw_dump.py +++ b/scripts/examples/09-WiFi/WINC1500/fw_dump.py @@ -9,4 +9,4 @@ import network wlan = network.WINC(mode=network.WINC.MODE_FIRMWARE) # For ATWINC1500-MR210PB only. -wlan.fw_dump("/winc_19_7_6.bin") +wlan.fw_dump("winc_19_7_6.bin") diff --git a/scripts/examples/09-WiFi/WINC1500/fw_update.py b/scripts/examples/09-WiFi/WINC1500/fw_update.py index 48c9bd4a4..944328af4 100644 --- a/scripts/examples/09-WiFi/WINC1500/fw_update.py +++ b/scripts/examples/09-WiFi/WINC1500/fw_update.py @@ -20,4 +20,4 @@ import network wlan = network.WINC(mode=network.WINC.MODE_FIRMWARE) # For ATWINC1500-MR210PB only. -wlan.fw_update("/winc_19_7_6.bin") +wlan.fw_update("winc_19_7_6.bin") diff --git a/scripts/examples/09-WiFi/http_post.py b/scripts/examples/09-WiFi/http_post.py index 44d304d5c..7f308aa89 100644 --- a/scripts/examples/09-WiFi/http_post.py +++ b/scripts/examples/09-WiFi/http_post.py @@ -6,6 +6,7 @@ import network import requests +import time # AP info SSID = "" # Network SSID diff --git a/scripts/examples/50-OpenMV-Boards/50-STM32-Boards/50-Board-Control/pwm_control.py b/scripts/examples/50-OpenMV-Boards/50-STM32-Boards/50-Board-Control/pwm_control.py index dc12c5831..f17cbaa58 100644 --- a/scripts/examples/50-OpenMV-Boards/50-STM32-Boards/50-Board-Control/pwm_control.py +++ b/scripts/examples/50-OpenMV-Boards/50-STM32-Boards/50-Board-Control/pwm_control.py @@ -10,10 +10,9 @@ import time from pyb import Pin, Timer tim = Timer(4, freq=1000) # Frequency in Hz -# Generate a 1KHz square wave on TIM4 with 50%, 75% and 50% duty cycles on channels 1, 2 and 3 respectively. +# Generate a 1KHz square wave on TIM4 with 50% and 75% duty cycles on channels 1 and 2 respectively. ch1 = tim.channel(1, Timer.PWM, pin=Pin("P7"), pulse_width_percent=50) ch2 = tim.channel(2, Timer.PWM, pin=Pin("P8"), pulse_width_percent=75) -ch3 = tim.channel(3, Timer.PWM, pin=Pin("P9"), pulse_width_percent=50) while True: time.sleep_ms(1000)