Input Pins 1 and 2 do not work of the 8
Port, board and/or hardware
ARDUINO_OPTA
MicroPython version
MicroPython v1.24.0 on 2024-10-25; Arduino OPTA with STM32H747
Reproduction
import machine
from machine import Pin
pin1 = Pin("IN_1")
pin1.value()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'Pin' object has no attribute 'value'
pin1.irq(trigger=Pin.IRQ_RISING | Pin.IRQ_FALLING, handler=self._callback)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'Pin' object has no attribute 'irq'
pin2 = Pin("IN_2")
pin2.value()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'Pin' object has no attribute 'value'
pin2.irq(trigger=Pin.IRQ_RISING | Pin.IRQ_FALLING, handler=self._callback)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'Pin' object has no attribute 'irq'
Expected behaviour
pin3 = Pin("IN_3")
pin3.value()
0
Observed behaviour
Pin 1 and 2 do not work.
It seems that the pin 1 and 2 are not instantiated correctly. Whether with IN_1 or PA0_C.
Pins 3 to 8 work both ways.
Additional Information
No, I've provided everything above.
Code of Conduct
Yes, I agree
esp32/machine_pin: ESP32-P4 pin 54 can't be set to output
Port, board and/or hardware
esp32 port, generic ESP32-P4 board
MicroPython version
MicroPython v1.27.0 on 2025-12-09; Generic ESP32P4 module with ESP32P4
Reproduction
MicroPython v1.27.0 on 2025-12-09; Generic ESP32P4 module with ESP32P4
Type "help()" for more information.
>>> import machine
>>> machine.Pin(53, machine.Pin.OUT)
Pin(53)
>>> machine.Pin(54, machine.Pin.OUT)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: pin can only be input
Expected behaviour
machine.Pin(54, machine.Pin.OUT) should work, because all GPIO pins on the ESP32-P4 are output capable.
Observed behaviour
machine.Pin(54, machine.Pin.OUT) states pin can only be input, which is false.
Additional Information
No, I've provided everything above.
Code of Conduct
Yes, I agree