Skip to content

Commit 93b03d8

Browse files
authored
Merge pull request #60 from tobybroberts/patch-1
Changed Pin 25 to "LED"
2 parents 5a823b1 + 07a5c25 commit 93b03d8

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

multicore/multicore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import time, _thread, machine
22

33
def task(n, delay):
4-
led = machine.Pin(25, machine.Pin.OUT)
4+
led = machine.Pin("LED", machine.Pin.OUT)
55
for i in range(n):
66
led.high()
77
time.sleep(delay)

pio/pio_blink.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def blink():
1919
nop() [31]
2020
wrap()
2121

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

2525
# Run the state machine for 3 seconds. The LED should blink.

pio/pio_exec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def prog():
1414
pass
1515

1616

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

2020
# Turn on the set pin via an exec instruction.

pio/pio_pwm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def set(self, value):
3434
self._sm.put(value)
3535

3636

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

4040
while True:

pwm/pwm_fade.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
# Construct PWM object, with LED on Pin(25).
8-
pwm = PWM(Pin(25))
8+
pwm = PWM(Pin("LED"))
99

1010
# Set the PWM frequency.
1111
pwm.freq(1000)

0 commit comments

Comments
 (0)