esphome/tests/test6.yaml
Ilia Sotnikov 7bb67ae94b
[ADC] Support measuring VCC on Raspberry Pico (W) (#5335)
* [ADC] Support measuring VCC on Raspberry Pico (W)

Added support for measuring VCC on Raspberry Pico (W) with ADC.
GPIO pin is provided as `VCC`, same as with ESP8266. VSYS is the voltage
being actually processed, and might have an offset from actual power
supply voltage (e.g. USB on VBUS) due to voltage drop on
Schottky diode between VSYS and VBUS on Rasberry Pico. The offset has
experimentally been found to be ~0.25V on Pico W and ~0.1 on Pico,
presumably due to different power consumption.

Example usage:

	sensor:
	  - platform: adc
	    pin: VCC
	    name: "VSYS"

* + Added tests for VCC measuring on `rpipicow` board
2023-09-09 04:00:45 -05:00

68 lines
1.0 KiB
YAML

---
esphome:
name: test6
project:
name: esphome.test6_project
version: "1.0.0"
rp2040:
board: rpipicow
framework:
# Waiting for https://github.com/platformio/platform-raspberrypi/pull/36
platform_version: https://github.com/maxgerhardt/platform-raspberrypi.git
wifi:
networks:
- ssid: "MySSID"
password: "password1"
api:
ota:
logger:
debug:
binary_sensor:
- platform: gpio
pin: GPIO5
id: pin_5_button
output:
- platform: gpio
pin: GPIO4
id: pin_4
switch:
- platform: output
output: pin_4
id: pin_4_switch
#light:
# - platform: rp2040_pio_led_strip
# id: led_strip
# pin: GPIO13
# num_leds: 60
# pio: 0
# rgb_order: GRB
# chipset: WS2812
# - platform: rp2040_pio_led_strip
# id: led_strip_custom_timings
# pin: GPIO13
# num_leds: 60
# pio: 1
# rgb_order: GRB
# bit0_high: .1us
# bit0_low: 1.2us
# bit1_high: .69us
# bit1_low: .4us
sensor:
- platform: internal_temperature
name: Internal Temperature
- platform: adc
pin: VCC
name: VSYS