Skip to content

Commit 9ca737c

Browse files
Fw update for final testing
1 parent bd0c5d3 commit 9ca737c

File tree

2 files changed

+56
-2
lines changed

2 files changed

+56
-2
lines changed

source_only_examples/project4_b.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
myOLED = QwiicLargeOled()
1919

2020
# Create an ADC object for reading the temperature sensor
21-
tempSensor = ADC(Pin.board.A0) # A0 is the pin we connected the temperature sensor to
21+
tempSensor = ADC(Pin.board.A5) # A5 is the pin we connected the temperature sensor to
2222

2323
def temperatureC():
2424
voltage = tempSensor.read_u16() * 3.3 / 65535.0 # Convert the raw reading to a voltage (0-5V)

source_only_examples/sik_utilities.py

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,58 @@ def read_us(self):
4545
return self.current_us
4646

4747
def off(self):
48-
self.pwm.duty_ns(0)
48+
self.pwm.duty_ns(0)
49+
50+
# Functions for running each script in the sik_examples folder
51+
# Note: This is NOT the best practice way to do this, but it makes each script less
52+
# confusing for beginners since the main content of each file isn't wrapped in a function, while still making it
53+
# so that each script can be run with a single command. This also frees users from having to worry about
54+
# import paths and such. These functions will be sourced in boot.py to make them always available in the REPL
55+
56+
def run_example_1a():
57+
exec(open("/sik_examples/project1_a.py").read())
58+
59+
def run_example_1b():
60+
exec(open("/sik_examples/project1_b.py").read())
61+
62+
def run_example_1c():
63+
exec(open("/sik_examples/project1_c.py").read())
64+
65+
def run_example_1d():
66+
exec(open("/sik_examples/project1_d.py").read())
67+
68+
def run_example_2a():
69+
exec(open("/sik_examples/project2_a.py").read())
70+
71+
def run_example_2b():
72+
exec(open("/sik_examples/project2_b.py").read())
73+
74+
def run_example_2c():
75+
exec(open("/sik_examples/project2_c.py").read())
76+
77+
def run_example_3a():
78+
exec(open("/sik_examples/project3_a.py").read())
79+
80+
def run_example_3b():
81+
exec(open("/sik_examples/project3_b.py").read())
82+
83+
def run_example_3c():
84+
exec(open("/sik_examples/project3_c.py").read())
85+
86+
def run_example_4a():
87+
exec(open("/sik_examples/project4_a.py").read())
88+
89+
def run_example_4b():
90+
exec(open("/sik_examples/project4_b.py").read())
91+
92+
def run_example_4c():
93+
exec(open("/sik_examples/project4_c.py").read())
94+
95+
def run_example_5a():
96+
exec(open("/sik_examples/project5_a.py").read())
97+
98+
def run_example_5b():
99+
exec(open("/sik_examples/project5_b.py").read())
100+
101+
def run_example_5c():
102+
exec(open("/sik_examples/project5_c.py").read())

0 commit comments

Comments
 (0)