Commit Graph

11 Commits

Author SHA1 Message Date
Samuel Sieb fdd54d74a3
Don't crash with invalid adc pin (#6059)
* Don't crash with invalid adc pin

* lint
2024-01-07 21:39:53 -06:00
Clyde Stubbs d9792b0d92
Checks for pins used in multiple places (#5666) 2023-12-05 08:56:53 +09:00
Jesse Hills fc354eec0e
Attempt to fix rp2040 adc with vcc (#5378) 2023-09-12 14:14:10 +12:00
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
Kuba Szczodrzyński a9630ac847
Support for LibreTiny platform (RTL8710, BK7231 & other modules) (#3509)
Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>
Co-authored-by: Sam Neirinck <git@samneirinck.com>
Co-authored-by: David Buezas <dbuezas@users.noreply.github.com>
Co-authored-by: Stroe Andrei Catalin <catalin2402@gmail.com>
Co-authored-by: Sam Neirinck <github@samneirinck.be>
Co-authored-by: Péter Sárközi <xmisterhu@gmail.com>
Co-authored-by: Hajo Noerenberg <hn@users.noreply.github.com>
2023-09-05 10:16:08 +12:00
Austin fe7893d1b3
Support for ESP32-C2 & ESP32-C6 (#4377)
Co-authored-by: Stijn Tintel <stijn@linux-ipv6.be>
2023-08-21 09:42:03 +12:00
Pierre-Alexis Ciavaldini 3ac0165f00
ESP32 enable ADC2 when wifi is disabled (#4381)
Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
2023-07-17 07:42:01 +12:00
Jesse Hills 39a650ee54
Add more configuration for microphones - i2s/pdm/adc (#4775) 2023-05-10 16:37:21 +12:00
Guillermo Ruffino 69879920eb
add-black (#1593)
* Add black

Update pre commit

Update pre commit

add empty line

* Format with black
2021-03-07 16:03:16 -03:00
Otto Winter 4996967c79
Add CODEOWNERS mechanism (#1199) 2020-07-25 15:57:18 +02:00
Otto Winter 6682c43dfa
🏗 Merge C++ into python codebase (#504)
## Description:

Move esphome-core codebase into esphome (and a bunch of other refactors). See https://github.com/esphome/feature-requests/issues/97

Yes this is a shit ton of work and no there's no way to automate it :( But it will be worth it 👍

Progress:
- Core support (file copy etc): 80%
- Base Abstractions (light, switch): ~50%
- Integrations: ~10%
- Working? Yes, (but only with ported components).

Other refactors:
- Moves all codegen related stuff into a single class: `esphome.codegen` (imported as `cg`)
- Rework coroutine syntax
- Move from `component/platform.py` to `domain/component.py` structure as with HA
- Move all defaults out of C++ and into config validation.
- Remove `make_...` helpers from Application class. Reason: Merge conflicts with every single new integration.
- Pointer Variables are stored globally instead of locally in setup(). Reason: stack size limit.

Future work:
- Rework const.py - Move all `CONF_...` into a conf class (usage `conf.UPDATE_INTERVAL` vs `CONF_UPDATE_INTERVAL`). Reason: Less convoluted import block
- Enable loading from `custom_components` folder.

**Related issue (if applicable):** https://github.com/esphome/feature-requests/issues/97

**Pull request in [esphome-docs](https://github.com/esphome/esphome-docs) with documentation (if applicable):** esphome/esphome-docs#<esphome-docs PR number goes here>

## Checklist:
  - [ ] The code change is tested and works locally.
  - [ ] Tests have been added to verify that the new code works (under `tests/` folder).

If user exposed functionality or configuration variables are added/changed:
  - [ ] Documentation added/updated in [esphomedocs](https://github.com/OttoWinter/esphomedocs).
2019-04-17 12:06:00 +02:00