mirror of
https://github.com/openmv/openmv.git
synced 2025-09-26 23:09:13 +08:00
example: Fix examples.
This commit is contained in:
parent
47704a3856
commit
c42bace0a5
@ -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)
|
||||
|
@ -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()
|
||||
|
@ -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")
|
||||
|
@ -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")
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
import network
|
||||
import requests
|
||||
import time
|
||||
|
||||
# AP info
|
||||
SSID = "" # Network SSID
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user