mirror of
https://github.com/openmv/openmv.git
synced 2025-09-26 23:09:13 +08:00
scripts/examples: Fix Portenta pins.
This commit is contained in:
parent
e9483eef62
commit
046bac79d9
@ -6,8 +6,8 @@ from pyb import Pin
|
||||
|
||||
# Connect a switch to pin 0 that will pull it low when the switch is closed.
|
||||
# Pin 1 will then light up.
|
||||
pin0 = Pin("P0", Pin.IN, Pin.PULL_UP)
|
||||
pin1 = Pin("P1", Pin.OUT_PP, Pin.PULL_NONE)
|
||||
pin0 = Pin("D0", Pin.IN, Pin.PULL_UP)
|
||||
pin1 = Pin("D1", Pin.OUT_PP, Pin.PULL_NONE)
|
||||
|
||||
while True:
|
||||
pin1.value(not pin0.value())
|
||||
|
@ -8,9 +8,9 @@ import sensor
|
||||
import time
|
||||
from pyb import Pin, SPI
|
||||
|
||||
cs = Pin("P3", Pin.OUT_OD)
|
||||
rst = Pin("P7", Pin.OUT_PP)
|
||||
rs = Pin("P8", Pin.OUT_PP)
|
||||
cs = Pin("D11", Pin.OUT_OD)
|
||||
rst = Pin("D12", Pin.OUT_PP)
|
||||
rs = Pin("D13", Pin.OUT_PP)
|
||||
# The hardware SPI bus for your OpenMV Cam is always SPI bus 2.
|
||||
|
||||
# NOTE: The SPI clock frequency will not always be the requested frequency. The hardware only supports
|
||||
|
@ -12,7 +12,7 @@ def callback(line):
|
||||
|
||||
|
||||
led = pyb.LED(3)
|
||||
pin = Pin("P5", Pin.IN, Pin.PULL_UP)
|
||||
pin = Pin("D0", Pin.IN, Pin.PULL_UP)
|
||||
ext = ExtInt(pin, ExtInt.IRQ_FALLING, Pin.PULL_UP, callback)
|
||||
|
||||
# Enter Stop Mode. Note the IDE will disconnect.
|
||||
|
Loading…
Reference in New Issue
Block a user