• It works. I did a mistake. I assumed that at start up, every GPIO was set to "input", which is not the case (B6 is set to "af_output" by default on Pico). The control of a bidirectional line with pull-up seems alright now.
    Unfortunately, I am still unable to decode a digital bitstream from a PS/2 device with Espruino. It seems that despite the use of event-triggered setWatch() function, the code is interpreted too slowly.

    I remember that Espruino exposes a function to sample an analog bitstream (in & out). It may be really cool to have such a function for a digital bitstream, which can not be decoded by a UART nor a SPI. Whatever, Espruino is not meant to be efficient on sampling bitstreams. I would use an external MCU to interface my PS/2 device with Espruino (PS/2 <--> UART converter).

    Thank you @DrAzzy for your support!

About