UBISS2024exam: Difference between revisions

From Sketching with Hardware at LMU Wiki
Jump to navigation Jump to search
Created page with "=== Solution Task 1.2 Control external RGB === <syntaxhighlight lang="python" line='line'> # Blinky example import time from machine import Pin # This is the only LED pin av..."
 
No edit summary
Line 1: Line 1:
=== Solution Task 1.2 Control external RGB ===
<syntaxhighlight lang="python" line='line'>import time
<syntaxhighlight lang="python" line='line'>
# Blinky example
 
import time
from machine import Pin
from machine import Pin



Revision as of 10:28, 13 June 2024

import time
from machine import Pin

# This is the only LED pin available on the Nano RP2040,
# other than the RGB LED connected to Nano WiFi module.
led = Pin(6, Pin.OUT)

while (True):
   led.on()
   time.sleep_ms(250)
   led.off()
   time.sleep_ms(200)