Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ESPHome GPIO
#1
How can I reference the GPIO and analog pins in ESPHome? Can you provide some example? Thanks.
Reply
#2
sure, all our boards support ESPHome. Here is demo config:

# Example configuration entry
sensor:
- platform: adc
pin: 36
name: "analog-1"
update_interval: 10s
attenuation: 11db

- platform: adc
pin: 34
name: "analog-2"
update_interval: 10s
attenuation: 11db

- platform: adc
pin: 35
name: "analog-3"
update_interval: 10s
attenuation: 11db

- platform: adc
pin: 39
name: "analog-4"
update_interval: 10s
attenuation: 11db
Reply
#3
Thank you admin! The board also has 3 GPIO pins, what number are they? Can I use any of them for PWM output?
Reply
#4
here is all GPIO define: https://www.kincony.com/forum/showthread.php?tid=1666
sorry, PWM already have used by Ethernet pins.
Reply
#5
Hi,

Is it possible to integrate Gpio's (HT1, HT2, HT3) in esphome?

I'm using kc868-a16 and would like to integrate ds18b20.


Thanks in advance
Reply
#6
sure, it's ok.
Reply
#7
(10-05-2024, 12:00 AM)admin Wrote: sure, it's ok.

Hi, could you support me with setup?

My curent ymal in esp :

Code:
- platform: adc
    pin: 32
    name: "KC868-A16-HT1"
    update_interval: 10s
   
  - platform: adc
    pin: 33
    name: "KC868-A16-HT2"
    update_interval: 10s
 

  - platform: adc
    pin: 36
    name: "KC868-A16-A1"
    update_interval: 10s
    attenuation: 11db

  - platform: adc
    pin: 34
    name: "KC868-A16-A2"
    update_interval: 10s
    attenuation: 11db

  - platform: adc
    pin: 35
    name: "KC868-A16-A3"
    update_interval: 10s
    attenuation: 11db

  - platform: adc
    pin: 39
    name: "KC868-A16-A4"
    update_interval: 10s
    attenuation: 11db

Is that ok?

Thanks in advance.... Smile
Reply
#8
no, GPIO pins use for 1-wire sensor, such as DS18B20,DHT11,DHT22 sensor.
A1,A2,A3,A4 is analog input port, use for ADC.
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)