File tree Expand file tree Collapse file tree 2 files changed +56
-2
lines changed Expand file tree Collapse file tree 2 files changed +56
-2
lines changed Original file line number Diff line number Diff line change 18
18
myOLED = QwiicLargeOled ()
19
19
20
20
# 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
22
22
23
23
def temperatureC ():
24
24
voltage = tempSensor .read_u16 () * 3.3 / 65535.0 # Convert the raw reading to a voltage (0-5V)
Original file line number Diff line number Diff line change @@ -45,4 +45,58 @@ def read_us(self):
45
45
return self .current_us
46
46
47
47
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 ())
You can’t perform that action at this time.
0 commit comments