Hi @thebradleysanders
I see you converted the code for the mega any idea how to convert it for the 32u4?
https://github.com/thebradleysanders/ESPHome-Arduino-Port-Expander/blob/main/arduino_port_expander.h#L34
How do you get the right binary values for the pins?
01 (INT.6/AIN0) PE6
02 UVcc
03 D
04 D+
05 UGnd
06 UCap
07 VBus
08 (SS/PCINT0) PB0
09 (PCINT1/SCLK) PB1
10 (PDI/PCINT2/MOSI) PB2
11 (PDO/PCINT3/MISO) PB3
12 (PCINT7/OC0A/OC1C/RTS) PB7
13 RESET
14 VCC
15 GND
16 XTAL2
17 XTAL1
*18 (OC0B/SCL/INT0) PD0
*19 (SDA/INT1) PD1
20 (RXD1/INT2) PD2
21 (TXD1/INT3) PD3
22 (XCK1/CTS) PD5
23 GND
24 AVCC
25 PD4 (ICP1/ADC8)
26 PD6 (T1/OC4D/ADC9)
27 PD7 (T0/OC4D/ADC10)
28 PB4 (PCINT4/ADC11)
29 PB5 (PCINT5/OC1A/OC4B/ADC12)
30 PB6 (PCINT6/OC1B/OC4B/ADC13)
31 PC6 (OC3A/OC4A)
32 PC7 (ICP3/CLK0/OC4A)
33 PE2 (HWB)
34 VCC
35 GND
Analog
32u4 324p Not defined
36 PF7 (ADC7/TDI) 22 ADC7
37 PF6 (ADC6/TDO) 19 ADC6
38 PF5 (ADC5/TMS) 28 PC5 (ADC5/SCL/PCINT13) 26 PC3 (ADC3/PCINT11)
39 PF4 (ADC4/TCK) 27 PC4 (ADC4/SDA/PCINT12) 25 PC2 (ADC2/PCINT10)
40 PF1 (ADC1) 22 PC1 (ADC1/PCINT9)
41 PF0 (ADC0) 23 PC0 (ADC0/PCINT8)
42 AREF
43 GND
44 AVCC
Thank you for any help.
Hi @thebradleysanders
I see you converted the code for the mega any idea how to convert it for the 32u4?
https://github.com/thebradleysanders/ESPHome-Arduino-Port-Expander/blob/main/arduino_port_expander.h#L34
How do you get the right binary values for the pins?
Thank you for any help.