File tree Expand file tree Collapse file tree 5 files changed +8
-8
lines changed Expand file tree Collapse file tree 5 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 12
12
13
13
display .set_backlight (0.8 )
14
14
15
- vsys = ADC (29 ) # reads the system input voltage
15
+ vsys = ADC (Pin ( 29 )) # reads the system input voltage
16
16
charging = Pin (24 , Pin .IN ) # reading GP24 tells us whether or not USB power is connected
17
17
conversion_factor = 3 * 3.3 / 65535
18
18
Original file line number Diff line number Diff line change 13
13
14
14
display .set_backlight (0.8 )
15
15
16
- vsys = ADC (29 ) # reads the system input voltage
16
+ vsys = ADC (Pin ( 29 )) # reads the system input voltage
17
17
charging = Pin (24 , Pin .IN ) # reading GP24 tells us whether or not USB power is connected
18
18
conversion_factor = 3 * 3.3 / 65535
19
19
Original file line number Diff line number Diff line change 13
13
14
14
buzzer = Buzzer (0 )
15
15
16
- vsys = ADC (29 ) # reads the system input voltage
16
+ vsys = ADC (Pin ( 29 )) # reads the system input voltage
17
17
charging = Pin (24 , Pin .IN ) # reading GP24 tells us whether or not USB power is connected
18
18
conversion_factor = 3 * 3.3 / 65535
19
19
Original file line number Diff line number Diff line change 32
32
button_b = Button (8 , invert = False )
33
33
# Pins and analogue-digital converters we need to set up to measure sensors.
34
34
lux_vref_pwr = Pin (27 , Pin .OUT )
35
- lux = ADC (26 )
36
- vbat_adc = ADC (29 )
37
- vref_adc = ADC (28 )
35
+ lux = ADC (Pin ( 26 ) )
36
+ vbat_adc = ADC (Pin ( 29 ) )
37
+ vref_adc = ADC (Pin ( 28 ) )
38
38
usb_power = Pin (24 , Pin .IN )
39
39
40
40
display = PicoGraphics (display = DISPLAY_TUFTY_2040 )
Original file line number Diff line number Diff line change 10
10
display .set_backlight (0.8 )
11
11
12
12
# set up the ADCs for measuring battery voltage
13
- vbat_adc = ADC (29 )
14
- vref_adc = ADC (28 )
13
+ vbat_adc = ADC (Pin ( 29 ) )
14
+ vref_adc = ADC (Pin ( 28 ) )
15
15
vref_en = Pin (27 )
16
16
vref_en .init (Pin .OUT )
17
17
vref_en .value (0 )
You can’t perform that action at this time.
0 commit comments