Skip to content

Commit ee08412

Browse files
committed
changed example launch method(ology)
1 parent 6c4f13c commit ee08412

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

examples/mpy_rgb_blink/mpy_rgb_blink.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def rgb_blink_example(led, count=20):
128128
# Run the example when this file is loaded
129129

130130

131-
def run_example():
131+
def run():
132132

133133
print("-----------------------------------------------------------")
134134
print("Running the SparkFun RGB blink example...")
@@ -149,4 +149,4 @@ def run_example():
149149
print("Done!")
150150

151151

152-
run_example()
152+
run()

examples/mpy_rgb_ramp/mpy_rgb_ramp.py

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,19 @@ def rgb_ramp_example():
180180
led.write()
181181

182182

183-
# ---------------------------------------------------------------------------------
184-
# Run the example when this file is loaded
185-
print("-----------------------------------------------------------")
186-
print("Running the SparkFun RGB ramp example...")
187-
print("-----------------------------------------------------------")
188-
rgb_ramp_example()
189-
print("Done!")
183+
def run():
184+
"""
185+
@brief Run the RGB ramp example.
186+
187+
@details
188+
- Calls the rgb_ramp_example function to demonstrate LED color transitions.
189+
"""
190+
191+
print("-----------------------------------------------------------")
192+
print("Running the SparkFun RGB ramp example...")
193+
print("-----------------------------------------------------------")
194+
rgb_ramp_example()
195+
print("Done!")
196+
197+
198+
run()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy