kopia lustrzana https://github.com/pimoroni/pimoroni-pico
commit
b8f4bd3f67
|
@ -12,7 +12,7 @@ display = PicoGraphics(display=DISPLAY_PICO_DISPLAY, rotate=0)
|
|||
|
||||
display.set_backlight(0.8)
|
||||
|
||||
vsys = ADC(29) # reads the system input voltage
|
||||
vsys = ADC(Pin(29)) # reads the system input voltage
|
||||
charging = Pin(24, Pin.IN) # reading GP24 tells us whether or not USB power is connected
|
||||
conversion_factor = 3 * 3.3 / 65535
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ display = PicoGraphics(display=DISPLAY_PICO_DISPLAY, rotate=0)
|
|||
|
||||
display.set_backlight(0.8)
|
||||
|
||||
vsys = ADC(29) # reads the system input voltage
|
||||
vsys = ADC(Pin(29)) # reads the system input voltage
|
||||
charging = Pin(24, Pin.IN) # reading GP24 tells us whether or not USB power is connected
|
||||
conversion_factor = 3 * 3.3 / 65535
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ display = PicoGraphics(display=DISPLAY_PICO_EXPLORER)
|
|||
|
||||
buzzer = Buzzer(0)
|
||||
|
||||
vsys = ADC(29) # reads the system input voltage
|
||||
vsys = ADC(Pin(29)) # reads the system input voltage
|
||||
charging = Pin(24, Pin.IN) # reading GP24 tells us whether or not USB power is connected
|
||||
conversion_factor = 3 * 3.3 / 65535
|
||||
|
||||
|
|
|
@ -32,9 +32,9 @@ button_a = Button(7, invert=False)
|
|||
button_b = Button(8, invert=False)
|
||||
# Pins and analogue-digital converters we need to set up to measure sensors.
|
||||
lux_vref_pwr = Pin(27, Pin.OUT)
|
||||
lux = ADC(26)
|
||||
vbat_adc = ADC(29)
|
||||
vref_adc = ADC(28)
|
||||
lux = ADC(Pin(26))
|
||||
vbat_adc = ADC(Pin(29))
|
||||
vref_adc = ADC(Pin(28))
|
||||
usb_power = Pin(24, Pin.IN)
|
||||
|
||||
display = PicoGraphics(display=DISPLAY_TUFTY_2040)
|
||||
|
|
|
@ -10,8 +10,8 @@ display = PicoGraphics(display=DISPLAY_TUFTY_2040)
|
|||
display.set_backlight(0.8)
|
||||
|
||||
# set up the ADCs for measuring battery voltage
|
||||
vbat_adc = ADC(29)
|
||||
vref_adc = ADC(28)
|
||||
vbat_adc = ADC(Pin(29))
|
||||
vref_adc = ADC(Pin(28))
|
||||
vref_en = Pin(27)
|
||||
vref_en.init(Pin.OUT)
|
||||
vref_en.value(0)
|
||||
|
|
Ładowanie…
Reference in New Issue