Skip to content

Changed Pin 25 to "LED" #60

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Mar 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion multicore/multicore.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import time, _thread, machine

def task(n, delay):
led = machine.Pin(25, machine.Pin.OUT)
led = machine.Pin("LED", machine.Pin.OUT)
for i in range(n):
led.high()
time.sleep(delay)
Expand Down
2 changes: 1 addition & 1 deletion pio/pio_blink.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def blink():
nop() [31]
wrap()

# Instantiate a state machine with the blink program, at 2000Hz, with set bound to Pin(25) (LED on the rp2 board)
# Instantiate a state machine with the blink program, at 2000Hz, with set bound to Pin(25) (LED on the Pico board)
sm = rp2.StateMachine(0, blink, freq=2000, set_base=Pin(25))

# Run the state machine for 3 seconds. The LED should blink.
Expand Down
2 changes: 1 addition & 1 deletion pio/pio_exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def prog():
pass


# Construct the StateMachine, binding Pin(25) to the set pin.
# Construct the StateMachine, binding Pin 25 to the set pin.
sm = rp2.StateMachine(0, prog, set_base=Pin(25))

# Turn on the set pin via an exec instruction.
Expand Down
2 changes: 1 addition & 1 deletion pio/pio_pwm.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def set(self, value):
self._sm.put(value)


# Pin 25 is LED on Pico boards
# Pin 25 on Pico boards
pwm = PIOPWM(0, 25, max_count=(1 << 16) - 1, count_freq=10_000_000)

while True:
Expand Down
2 changes: 1 addition & 1 deletion pwm/pwm_fade.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


# Construct PWM object, with LED on Pin(25).
pwm = PWM(Pin(25))
pwm = PWM(Pin("LED"))

# Set the PWM frequency.
pwm.freq(1000)
Expand Down