scripts/examples: Fix Portenta pins.

This commit is contained in:
iabdalkader 2023-10-16 19:22:30 +02:00
parent e9483eef62
commit 046bac79d9
3 changed files with 6 additions and 6 deletions

View File

@ -6,8 +6,8 @@ from pyb import Pin
# Connect a switch to pin 0 that will pull it low when the switch is closed. # Connect a switch to pin 0 that will pull it low when the switch is closed.
# Pin 1 will then light up. # Pin 1 will then light up.
pin0 = Pin("P0", Pin.IN, Pin.PULL_UP) pin0 = Pin("D0", Pin.IN, Pin.PULL_UP)
pin1 = Pin("P1", Pin.OUT_PP, Pin.PULL_NONE) pin1 = Pin("D1", Pin.OUT_PP, Pin.PULL_NONE)
while True: while True:
pin1.value(not pin0.value()) pin1.value(not pin0.value())

View File

@ -8,9 +8,9 @@ import sensor
import time import time
from pyb import Pin, SPI from pyb import Pin, SPI
cs = Pin("P3", Pin.OUT_OD) cs = Pin("D11", Pin.OUT_OD)
rst = Pin("P7", Pin.OUT_PP) rst = Pin("D12", Pin.OUT_PP)
rs = Pin("P8", Pin.OUT_PP) rs = Pin("D13", Pin.OUT_PP)
# The hardware SPI bus for your OpenMV Cam is always SPI bus 2. # 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 # NOTE: The SPI clock frequency will not always be the requested frequency. The hardware only supports

View File

@ -12,7 +12,7 @@ def callback(line):
led = pyb.LED(3) 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) ext = ExtInt(pin, ExtInt.IRQ_FALLING, Pin.PULL_UP, callback)
# Enter Stop Mode. Note the IDE will disconnect. # Enter Stop Mode. Note the IDE will disconnect.